I'm writing a program to process a form file created using a form designer. In one form I can have one or more listboxes (i.e. note field or listbox for inventory). Each field is identified by a unique number (1=string, 2=listbox, 3=number, etc).
When I inialize the program, I assign the segment/address of the different arrays to a field structure....
REDIM Notes$(1 To 20)
Redim Items$(1 to 100)
Dim Fld(1 to 25) As FieldInfo
Fld(1).Segment = SSEG(Notes$(1))
Fld(1).Address = SADD(Notes$(1))
.
.
Fld(15).Segment = SSEG(Items$(1))
Fld(15).Address = SADD(Items$(1))
DO
Ikey = ProcForm( Fld() )
.
.
LOOP UNTIL Ikey = 27
Since the entire processing is inside a loop, I need to be able to access the different arrays from within the function just by using segment/address. I can do this using QuickBasic 4.5 but I am having problems doing this in PDS 7.1 using FAR STRINGS.
From inside the function PROCFORM() I need to know the following from the arrays...
1. LBOUND/UBOUND of the given SEGMENT/ADDRESS
2. Print each element of that variable length string array (not fixed length)
How do I get the string descriptor of a FAR STRING? Does anybody have a clue or a source code they can share with me??
I would appreciate any help...thanks
Passing Array Pointers
- DDastardly71
- Coder
- Posts: 22
- Joined: Fri Oct 17, 2008 6:56 pm
- Location: U.S.A.
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
SADD seldom works in PDS except in some Absolute routines.
Ted
Ted
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0