home *** CD-ROM | disk | FTP | other *** search
- // Getex06.prg
- //
- // Get command which only allows user to exit if ALL valid clauses
- // are satisfied
-
- #command READ => ReadModal(GetList); ;
- ReadValid(GetList); ;
- GetList := {}
-
- MEMVAR GetList
-
- FUNCTION Getex06
-
- LOCAL nVar1 := 0, ;
- nVar2 := 0, ;
- nVar3 := 0
-
- CLEAR SCREEN
- @ 10, 10 SAY "Must be > 10" GET nVar1 VALID nVar1 > 10
- @ 11, 10 SAY " Must be > 5" GET nVar2 VALID nVar2 > 5
- @ 12, 10 SAY " Must be < 0" GET nVar3 VALID nVar3 < 0
- READ
-
- RETURN NIL
-
-
- FUNCTION ReadValid(GetList)
-
- LOCAL nGet := 1
-
- DO WHILE nGet <= Len(GetList)
- DO WHILE ValType(GetList[nGet]:postBlock) == "B" .AND. ;
- !Eval(GetList[nGet]:postBlock, GetList[nGet])
- ReadModal({GetList[nGet]})
- ENDDO
- nGet++
- ENDDO
-
- RETURN NIL