The following code is in the manual and produces:
Joe 1 Joe 2 Joe 3
why dont I see the Integer Numbers?
#COMPILE EXE "Random.exe"
TYPE TestRec
uName AS STRING * 10
uNumber AS INTEGER
END TYPE
'¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤'
FUNCTION PBMAIN
DIM Rec AS TestRec, Record AS INTEGER
OPEN "RANDOM.DTA" FOR RANDOM AS #1 LEN = LEN(TestRec)
FOR Record = 1 TO 3
Rec.uName = "Joe" + STR$(Record)
Rec.uNumber = Record
PUT #1,Record, Rec
NEXT Record
CLOSE #1
END FUNCTION
'------------------------------------------------------------------------------
------------------
Kind Regards
Mike
Joe 1 Joe 2 Joe 3
why dont I see the Integer Numbers?
#COMPILE EXE "Random.exe"
TYPE TestRec
uName AS STRING * 10
uNumber AS INTEGER
END TYPE
'¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤'
FUNCTION PBMAIN
DIM Rec AS TestRec, Record AS INTEGER
OPEN "RANDOM.DTA" FOR RANDOM AS #1 LEN = LEN(TestRec)
FOR Record = 1 TO 3
Rec.uName = "Joe" + STR$(Record)
Rec.uNumber = Record
PUT #1,Record, Rec
NEXT Record
CLOSE #1
END FUNCTION
'------------------------------------------------------------------------------
------------------
Kind Regards
Mike
Comment