home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
max
/
max130
/
arynav.max
< prev
next >
Wrap
Text File
|
1988-10-30
|
2KB
|
67 lines
tclear ()
feval (..\misc\lstnav)
Function arynav
Begin
If eq (argc () 1)
Then
set (ad argv (1))
EndThen
Else
set (ad -1)
EndElse
EndIf
Loop
put ("Enter Command")
get (command)
Case command
When "cre"
put ("Enter Size")
get (size)
put (set (ad arycre (size)))
EndWhen
When "fre"
put (aryfre (ad))
EndWhen
When "ad"
put ("Enter Array Descriptor")
get (ad)
EndWhen
When "get"
put ("Enter Index")
get (i)
put (aryget (ad i))
EndWhen
When "set"
put ("Enter Index")
get (i)
put ("Enter Data")
get (data)
put (aryset (ad i data))
EndWhen
When "write"
set (size arysize (ad))
put ("Array size is " size)
For set (i 0) lt (i size) set (i add (i 1))
put ("array[" i "] = " aryget (ad i))
EndFor
EndWhen
When "lmap"
put (arylmap (ad))
EndWhen
When "quit"
exit ()
EndWhen
Default
put ("Unrecognized Command: " command)
EndDefault
EndCase
EndLoop
End
EndFunction