Passing Array Pointer

Please use this Board for QBasic related requests ( file research, programming, etc.)

Moderators:Administrator, Global Moderator

User avatar
DDastardly71
Jr. Member
Posts:15
Joined:Sun Jan 20, 2008 11:25 pm
Passing Array Pointer

Post by DDastardly71 » Wed Jan 14, 2009 9:58 pm

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

Post Reply