Page 1 of 1

Passing Array Pointer

Posted: Wed Jan 14, 2009 9:58 pm
by DDastardly71
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