Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : STRALEY.ZIP
Filename : AINSTEST.PRG
* Name AINSTEST.prg
* Date December 1, 1986
* Notice Copyright 1986, Stephen J. Straley
* Note This sample program first demonstrates how the AINS()
* function will insert a space within the array at the
*
*
* In order for this function to work, the Autumn '86
* version must be used and the DBU.LIB file
* must be linked in with the CLIPPER.LIB.
*
********************
CLEAR
DECLARE counter[10]
FOR x = 1 TO 10
counter[x] = x
NEXT
@ 1,5 SAY "Here is a list of numbers..."
?
FOR x = 1 TO 10
? counter[x]
NEXT
?
WAIT "Press any key to INSERT the 5th element in array list"
CLEAR
AINS(counter, 5)
@ 1,5 SAY "Here is the new list..."
?
? "The number of elements in the array is "
?? LEN(counter)
?
FOR x = 1 TO 10
? counter[x]
NEXT
?
?
TEXT
Notice that the length of the array remained at 10 though there
are only 9 elements showing on the screen. Also notice that
the 5th element is now blank and needs to have a value assigned
to it. Further, notice that all lower elements in the array
were moved down one position, including the old 5th element,
and that the last element in the array is removed from
the list.
ENDTEXT
* End of File
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/