[Info-vax] DCL's flaws (both scripting and UI)
David Froble
davef at tsoft-inc.com
Tue Jan 20 12:50:59 EST 2015
Jan-Erik Soderholm wrote:
> OK, so a similar data type exist in the base Basic distribution?
> I thought not.
If your position is dependent upon a particular data type existing, then
I submit the following:
10 Dim L$(99,2) ! Create an array of dynamic string descriptors
<some code to load L$(index,1) with a key value
and L$(index,2) with the associated data>
! This would be the "tool" to retrive data based upon the key
String Function RetriveData( <key> )
For I% = 1% to 99%
If <key> = L$(I%,1%)
Then RetriveData = L$(I%,2%)
Exit Function
End If
Next I%
RetriveData = ""
End Function
! This would be a retrival
D$ = RetriveData( <some key> )
Ok, syntax may not be all correct, and it's over simplified, but I think
the above shows just how easy it would be to implement that capability
in Basic, AND I submit that the data type to allow the capability
already exists in Basic.
More information about the Info-vax
mailing list