从表中反向读取记录

时间:2018-12-01 18:25:55

标签: basis

tbl_rlen = 12  dateCount = len(tbdata $)/ 12-1; rem分配一个var来保存表中存在的日期总数

startingDatePosn = max(0,dateCount-125); rem分配一个var来保存表数据的起始位置(662) VSS 11/27/18 <<<<<< / p>

    FOR I=0 TO 125

        IF TBDATA$((I * tbl_rlen) + 1, 12) = FILL(12, " ") THEN

            REM  if blank, then read next loop; changed the var to use the record length (662) *VSS* 11/27/18

            continue

        ENDIF

        x$ = tbdata$((i + startingDatePosn) * 12 + 1, 10); GOSUB GENDATE  

        HOLIDAYS[I]=X

    NEXT I

    tbdata$ contain whole data(data is dates here which occupies 12 bytes) from table.
    HOLIDAYS[I]=X holidays[i] array is of 125, Which i cannot change.


    I want reverse reading of data from the table, so that it reads the data 125 count of dates(each of 12 bytes) from the end of table
    Can anybody please help me out.

0 个答案:

没有答案