* makefile.bc
Added missing dependancy of source/rtl/tgetint.prg
* source/rtl/tgetint.prg
! Improved __GETA() - No longer uses slow function calls to traverse array.
bSetGet much faster because it no longer traverses base array every time bSetGet is evaluated,
because final array dimension is now compiled into the bSetGet :-)
- Removed no longer needed __GetAValue(
* tests/testread.prg
+ Added multi dimension GET test.
46 lines
830 B
Plaintext
46 lines
830 B
Plaintext
/*
|
|
* $Id$
|
|
*/
|
|
|
|
// Harbour Get System sample
|
|
|
|
function Main()
|
|
|
|
local cName := "Harbour "
|
|
local cWish := "Power "
|
|
local cEffort := "Join us! "
|
|
local acVars := { { "Hello", "World" } }, Counter
|
|
|
|
local GetList := {}
|
|
|
|
SET COLOR TO GR+/B, W+/BG
|
|
CLS
|
|
|
|
SET KEY -1 TO ShowVar()
|
|
|
|
@ 2, 2 SAY "Enter your name :" GET cName PICTURE "@K!"
|
|
@ 4, 2 SAY "Enter your wish :" GET cWish
|
|
@ 6, 2 SAY "Enter your effort:" GET cEffort
|
|
@ 8, 2 SAY "Object Data :" GET GetList[1]:Picture
|
|
|
|
FOR Counter := 1 TO Len( acVars[1] )
|
|
@ Row() + 2, 2 SAY "Array Element[1][" + Str( Counter, 1 ) + "]: " GET acVars[1][ Counter ]
|
|
NEXT
|
|
|
|
READ
|
|
|
|
@ Row() + 2, 2
|
|
? cName
|
|
? cWish
|
|
? cEffort
|
|
? acVars[1][1]
|
|
? acVars[1][2]
|
|
|
|
return nil
|
|
|
|
function ShowVar()
|
|
|
|
Alert( Readvar() )
|
|
|
|
return nil
|