DEFINT A
-Z
' everything is integer unless DIM or suffix CONST nRows
= 11 'rows of 5 data points in each line of fileDat DIM a
AS STRING, count
, i
, lineNum
' for file and array access DIM row
, col
, aPlace
' for screening Data from a string DIM rowCnt
, x
, y
, d
, rowPlus
' for loading lineDAT() from a file string DIM lineDAT
(1 TO 5, 1 TO nRows
) AS INTEGER 'an array to load from each line from DAT
'count lines in file
' debug check inputs from file
'PRINT a
'INPUT " OK enter "; w$
IF LEN(_TRIM$(a
)) THEN count
= count
+ 1 'don't want empty lines _TRIM$ removes spaces or other nonsense
'now we now size of file so ready an array to load file Data
IF LEN(_TRIM$(a
)) THEN fileDAT
(i
) = a
'don't want empty lines _TRIM$ removes spaces or other nonsense
' NOW all the data if loaded into fileDAT() array, 480 strings of Lottory data
'set first line and get a data string from the FileDAT array
lineNum = 1
a = fileDAT(lineNum)
IF Q$
= "+" THEN lineNum
= lineNum
+ 1 IF lineNum
> count
THEN lineNum
= 1 IF Q$
= "-" THEN lineNum
= lineNum
- 1 IF lineNum
< 1 THEN lineNum
= count
'get new data line
a = fileDAT(lineNum)
'print out the data from the new line
GOSUB loadLineDAT_Mark30s
loadLineDAT_Mark30s: 'this loads the lineDAT array, so we can sweep through the columes and mark 30's
rowCnt = 1: y = 1
FOR i
= 5 TO LEN(a
) STEP 2 ' is marking off the start of each data 2 digit integer lineDAT
(rowCnt
, y
) = VAL(MID$(a
, i
, 2)) 'convert data item to integer rowCnt = rowCnt + 1 ' increase column if at 6 start new row
IF rowCnt
= 6 THEN y
= y
+ 1: rowCnt
= 1 COLOR 10 'blue marker seacrh through columes for 30's FOR col
= 4 TO 8 'for each of the columes of data FOR row
= 1 TO 10 'for each of the rows of dat FOR rowPlus
= row
+ 1 TO 11 'compare the next rows for diff 30 with current col, row IF diff30in90
(lineDAT
(col
, row
), lineDAT
(col
, rowPlus
)) THEN LOCATE rowPlus
* 2, col
* 3 - 2:
PRINT VAL(DD$
(lineDAT
(col
, rowPlus
)));
screenDataLine:
aPlace = 5
aPlace = aPlace + 2
'=========================== the above does this ==============================
'LOCATE 1, 34
'PRINT "estraz.num "; LEFT$(a, 4); " lineNum:"; STR$(lineNum)
'REM bari
'LOCATE 1, 13
'PRINT VAL(MID$(a, 5, 2))
'LOCATE 1, 16
'PRINT VAL(MID$(a, 7, 2))
'LOCATE 1, 19
'PRINT VAL(MID$(a, 9, 2))
'LOCATE 1, 22
'PRINT VAL(MID$(a, 11, 2))
'LOCATE 1, 25
'PRINT VAL(MID$(a, 13, 2))
'REM cagliari
'LOCATE 3, 13
'PRINT VAL(MID$(a, 15, 2))
'LOCATE 3, 16
'PRINT VAL(MID$(a, 17, 2))
'LOCATE 3, 19
'PRINT VAL(MID$(a, 19, 2))
'LOCATE 3, 22
'PRINT VAL(MID$(a, 21, 2))
'LOCATE 3, 25
'PRINT VAL(MID$(a, 23, 2))
'REM firenze
'LOCATE 5, 13
'PRINT VAL(MID$(a, 25, 2))
'LOCATE 5, 16
'PRINT VAL(MID$(a, 27, 2))
'LOCATE 5, 19
'PRINT VAL(MID$(a, 29, 2))
'LOCATE 5, 22
'PRINT VAL(MID$(a, 31, 2))
'LOCATE 5, 25
'PRINT VAL(MID$(a, 33, 2))
'REM genova
'LOCATE 7, 13
'PRINT VAL(MID$(a, 35, 2))
'LOCATE 7, 16
'PRINT VAL(MID$(a, 37, 2))
'LOCATE 7, 19
'PRINT VAL(MID$(a, 39, 2))
'LOCATE 7, 22
'PRINT VAL(MID$(a, 41, 2))
'LOCATE 7, 25
'PRINT VAL(MID$(a, 43, 2))
'REM milano
'LOCATE 9, 13
'PRINT VAL(MID$(a, 45, 2))
'LOCATE 9, 16
'PRINT VAL(MID$(a, 47, 2))
'LOCATE 9, 19
'PRINT VAL(MID$(a, 49, 2))
'LOCATE 9, 22
'PRINT VAL(MID$(a, 51, 2))
'LOCATE 9, 25
'PRINT VAL(MID$(a, 53, 2))
'REM napoli
'LOCATE 11, 13
'PRINT VAL(MID$(a, 55, 2))
'LOCATE 11, 16
'PRINT VAL(MID$(a, 57, 2))
'LOCATE 11, 19
'PRINT VAL(MID$(a, 59, 2))
'LOCATE 11, 22
'PRINT VAL(MID$(a, 61, 2))
'LOCATE 11, 25
'PRINT VAL(MID$(a, 63, 2))
'REM palermo
'LOCATE 13, 13
'PRINT VAL(MID$(a, 65, 2))
'LOCATE 13, 16
'PRINT VAL(MID$(a, 67, 2))
'LOCATE 13, 19
'PRINT VAL(MID$(a, 69, 2))
'LOCATE 13, 22
'PRINT VAL(MID$(a, 71, 2))
'LOCATE 13, 25
'PRINT VAL(MID$(a, 73, 2))
'REM roma
'LOCATE 15, 13
'PRINT VAL(MID$(a, 75, 2))
'LOCATE 15, 16
'PRINT VAL(MID$(a, 77, 2))
'LOCATE 15, 19
'PRINT VAL(MID$(a, 79, 2))
'LOCATE 15, 22
'PRINT VAL(MID$(a, 81, 2))
'LOCATE 15, 25
'PRINT VAL(MID$(a, 83, 2))
'REM torino
'LOCATE 17, 13
'PRINT VAL(MID$(a, 85, 2))
'LOCATE 17, 16
'PRINT VAL(MID$(a, 87, 2))
'LOCATE 17, 19
'PRINT VAL(MID$(a, 89, 2))
'LOCATE 17, 22
'PRINT VAL(MID$(a, 91, 2))
'LOCATE 17, 25
'PRINT VAL(MID$(a, 93, 2))
'REM venezia
'LOCATE 19, 13
'PRINT VAL(MID$(a, 95, 2))
'LOCATE 19, 16
'PRINT VAL(MID$(a, 97, 2))
'LOCATE 19, 19
'PRINT VAL(MID$(a, 99, 2))
'LOCATE 19, 22
'PRINT VAL(MID$(a, 101, 2))
'LOCATE 19, 25
'PRINT VAL(MID$(a, 103, 2))
'REM nazionale
'LOCATE 21, 13
'PRINT VAL(MID$(a, 105, 2))
'LOCATE 21, 16
'PRINT VAL(MID$(a, 107, 2))
'LOCATE 21, 19
'PRINT VAL(MID$(a, 109, 2))
'LOCATE 21, 22
'PRINT VAL(MID$(a, 111, 2))
'LOCATE 21, 25
'PRINT VAL(MID$(a, 113, 2))
'========================================================================
labelScreen:
' setup screen labels for reporting data
'some directions
FUNCTION DD$
(number
) 'convert a number into a 2 digit string$
FUNCTION diff30in90
(a
, b
) 'default integers a-z diff30in90 = -1