* tests/onidle.prg
* tests/codebloc.prg
* tests/keywords.prg
* tests/wvtext.prg
* tests/test_all.prg
* tests/ainstest.prg
* doc/es/compiler.txt
* doc/es/file.txt
* contrib/hbct/numconv.prg
* contrib/hbct/tests/expomant.prg
* contrib/hbwhat32/whatutil.prg
* contrib/hbwhat32/winrbar.prg
* contrib/hbwhat32/wintabs.prg
* contrib/hbwhat32/wincomm.prg
* contrib/hbwhat32/wincdlg.prg
* contrib/hbwhat32/wintbar.prg
* contrib/hbwhat32/_wininet.c
* contrib/hbwhat32/wincore.prg
* contrib/hbw32/w32_ole.c
* contrib/hbapollo/tests/apollo.prg
* contrib/hbnf/dispmsg.prg
* contrib/hbnf/fttext.c
* contrib/hbnf/mouse1.prg
* contrib/hbnf/menu1.prg
* contrib/hbnf/sleep.prg
* contrib/hbnf/xbox.prg
* contrib/hbnf/popadder.prg
* contrib/hbnf/mouse2.prg
* contrib/hbnf/pchr.prg
* contrib/hbhpdf/tests/harupdf.prg
* contrib/gtwvg/wvgclass.prg
* contrib/gtwvg/tests/demowvg.prg
* contrib/gtwvg/wvgpaint.prg
* contrib/rddads/tests/testmg.prg
* contrib/hbclipsm/tests/testgaug.prg
* contrib/hbfimage/tests/fitest.prg
* contrib/hbmisc/twirler.prg
* contrib/hbtip/httpcln.prg
* contrib/hbtip/ftpcln.prg
* contrib/hbvpdf/hbvpdft.prg
* utils/hbmake/hbmake.prg
* Some more general code cleanups.
* iif(), quote char, #include, filename-casing, = usage cleanups,
hardcoded absolute paths, non-ASCII drawing chars in source.
Using mixed-case filenames to #include .ch files breaks on
non-WinDOS platforms.
95 lines
1.8 KiB
Plaintext
95 lines
1.8 KiB
Plaintext
//
|
|
// $Id$
|
|
//
|
|
|
|
//
|
|
// Array test aIns / aDel / aSize / aFill
|
|
//
|
|
// Date : 26/4/99
|
|
// Time : 09:30
|
|
//
|
|
function Main()
|
|
|
|
local aFirst
|
|
local aSecond
|
|
local aMore
|
|
|
|
aFirst := aClone( { 1,2,4 } )
|
|
aIns( aFirst, 3 )
|
|
aFirst[3] := "3"
|
|
QQOut( "Testing aIns .. " )
|
|
aDump( aFirst )
|
|
|
|
aSecond := { 1,2,4 }
|
|
aSize( aSecond, 4 )
|
|
QQOut( "Testing aSize .. " )
|
|
aDump( aSecond )
|
|
|
|
aSecond := { 1,2,4 }
|
|
aSize( aSecond, 4 )
|
|
aIns( aSecond, 3 )
|
|
aSecond[3] := "3"
|
|
QQOut( "Testing aSize + aIns .. " )
|
|
aDump( aSecond )
|
|
|
|
aSecond := { 1,2,3,3,4,5 }
|
|
aDel( aSecond, 3 )
|
|
QQOut( "Testing aDel .. " )
|
|
aDump( aSecond )
|
|
|
|
aSecond := { 1,2,3,3,4,5 }
|
|
aDel( aSecond, 3 )
|
|
aSize( aSecond, len(aSecond) - 1 )
|
|
QQOut( "Testing aSize + aDel .. " )
|
|
aDump( aSecond )
|
|
|
|
aFill( aSecond, "!" )
|
|
QQOut( "Testing aFill .. " )
|
|
aDump( aSecond )
|
|
|
|
aMore := { 1,2,3,4,5,6 }
|
|
aFill( aMore, "X", 3 )
|
|
QQOut( "Testing aFill with start .. " )
|
|
aDump( aMore )
|
|
|
|
aMore := { 1,2,3,4,5,6 }
|
|
aFill( aMore, "X", 3, 2 )
|
|
QQOut( "Testing aFill with start and count .. " )
|
|
aDump( aMore )
|
|
|
|
aMore := { {1,2}, {3,4} }
|
|
aDel( aMore, 1 )
|
|
aDump( aMore )
|
|
return nil
|
|
|
|
function aDump( aShow )
|
|
|
|
local n
|
|
local CRLF := chr(13)+chr(10)
|
|
|
|
QQOut( "Len=", ALLTRIM( STR( len( aShow ) ) ) )
|
|
QQOut( ": " )
|
|
for n := 1 to len(aShow)
|
|
|
|
QQOut( "[" )
|
|
QQOut( ALLTRIM (STR (n)) )
|
|
QQOut( "]= " )
|
|
QQOut( ValType( aShow[n] ) )
|
|
QQOut( ":" )
|
|
if ValType( aShow[n] ) == "A" /* Iterate array */
|
|
QQOut( CRLF )
|
|
QQOut("[")
|
|
aDump( aShow[n] )
|
|
QQOut("]")
|
|
else
|
|
QQOut( aShow[n] )
|
|
endif
|
|
|
|
if n != len(aShow)
|
|
QQOut( ", " )
|
|
endif
|
|
|
|
next n
|
|
QQOut( CRLF )
|
|
return nil
|