TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: TIM HUTZLER
from: JAMES GOLDBLOOM
date: 1996-06-30 08:16:00
subject: Re: arrays in TYPE state

 TH> I don't pretend to be an expert on this, but I don't think that is
 TH> possible. A TYPE is a template, thus all string fields must be fixed
 TH> length. And, as you probably know an array can be made dynamic when
 TH> it is dimentioned.
I know what you're saying.  But a template variable can be defined by
a previously defined variable and not just a fixed value.  For
example:
-------------------------------------------
$if %test
  maxvalue  200
$else
  maxvalues=500
$endif
a$(1 to maxvalues) as string * 20
-------------------------------------------
In other words, the array a$ is indeed fixed (as you noted), but its
elements are predefined based on an existing structure. Not only does
the above syntax exist in one for or another in most high level
programming language structures, but it truly is fixed anyhow.  The
part I am referring to about being dynamic is the "maxvalues" part,
when in reality any part of the command should be a permissable variable
in theory.  If I knew what maxvalues was, say 200, I'd change my
structure simply to:  a$ as string * 4000
But I'm not referring to those instances, which are rare when it comes
to reading structures of BBS programs and database files written in
other languages.
-James (SysOp/AD Message System)
... If you become a success, you don't change - everyone else does.
--- QuickBBS 2.80 GoldBase (Zeta-2.0a)
---------------
* Origin: [Team QuickBBS] [Team OmegaSoft] [PB Fanatic!] (FIDONET 1:109/611)

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™.