dynamic arrays in FB/PB? 
Author Message
 dynamic arrays in FB/PB?

Is there a way to actually have completely dynamic arrays in firstBasic?

Does FirstBasic have Redim?

Does $Dynamic along with an array DIMed with a variable as the UBound only
create a variables whose UBound can be determined, not one that can grow and
shrink?

Is Erasing and re-building arrays with more or less members (different
UBound) the way to do this in FirstBasic?

Thanks very much.



Mon, 01 Apr 2002 03:00:00 GMT  
 dynamic arrays in FB/PB?

Quote:

>Is there a way to actually have completely dynamic arrays in firstBasic?

Yes. Use REDIM or DIM arrayname (dataname)

Quote:

>Does FirstBasic have Redim?

Yes, see above.

Quote:
>Does $Dynamic along with an array DIMed with a variable as the UBound only
>create a variables whose UBound can be determined, not one that can grow
and
>shrink?

DIMed with a variable and $DYNAMIC is redundant. Eriother creates a dynamic
array, which may be REDIMed to new lower and upper bounds; however, when a
FirstBASIC array is REDIMed, all values in the array are initialized. REDIM
PRESERVE was not avaialble in PB/DOS until version 3.5. (FB is PB/DOS 2.1).

Quote:

>Is Erasing and re-building arrays with more or less members (different
>UBound) the way to do this in FirstBasic?

Depends on what you want to do. See above: uou can REDIM dynamic arrays, but
then you lose any data currently stored in that array.

Note: FirstBASIC is shareware, meaning you can download it and try it. If it
does what you need, register it. If it doesn't, just remove it from your
disk.

MCM



Tue, 02 Apr 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. variable scoping in fb/pb?

2. Dynamic Arrays in PBU's PB 3.2

3. PB 3.2.PB/Vision 2.0 Timerinstallcode.Shared Arrays

4. PB/CC debugger and array variables

5. ARRAY SORT w/ UDTs in PB/cc

6. Pb with constructor and array

7. character array condition pb

8. MX Lookup with PB/CC or PB/DLL

9. TCPADDR for PB/DLL & PB/CC

10. Info on new PB/CC and PB/DLL

11. Announcing the JazzAge COM Wizard for PB/DLL and PB/CC

12. animated characters, speech input/output in PB/DLL and PB/CC

 

 
Powered by phpBB® Forum Software