TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: ALL
from: JAMES GOLDBLOOM
date: 1996-04-02 22:57:00
subject: ARRAYS in TYPE structures: HOW??

How does one integrate an array into a TYPE structure?
I know this, so far...
Syntax: DIM variable(x to y) as type
Example:  DIM card(1 to 4) as Byte
Ok, it's been dimensioned.  Now, what do I do *next* to work this into
my TYPE structure, so I *don't* have to do this (using above example):
Type Cardfile ' stupid way of doing it
 card1 as Byte
 card2 as Byte
 card3 as Byte
 card4 as Byte
END TYPE
This works fine for 4 elements... but, what if I have... FIVE HUNDRED??
There is no *%%#$! way I am gonna write 500 lines, ending with "card500"!
And, what about strings?  Let's say I want an array of 500 message
areas, each 35 characters long, to be read into my buffer?  What
syntax do I use to make that happen?
TYPE AreaNames
 area1 as string * 35
 area2 as string * 35
 .
 . (3 thru 499 here, ugh...)
 .
 area500 as string * 35
END TYPE
NO WAY!  THERE MUST BE AN EASIER WAY!!!  I wanna use arrays in TYPE's!
:-) 
-James (SysOp/AD Message System)
--- QuickBBS 2.80 GoldBase (Zeta-1)
---------------
* Origin: AD Message BBS/10th Year Online! (703)241-1826 (1:109/611@FIDONET)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.