Menu

A=LOF(1) Overflow

2015-12-05
2015-12-05
  • Ronald Herrera

    Ronald Herrera - 2015-12-05

    Hello; If a file (let's say PEEK.BIN) is over 60K bytes for example the statemente LOF(1) cause an Overflow error while in GWBASIC can handle it:
    OPEN "PEEK.BIN" FOR RANDOM AS #1 LEN=128: FIELD #1, 128 AS D$
    OK

    A = LOF(1)
    Overflow
    OK
    
    ? LOF(1)
    Overflow
    OK
    
     
    • Rob Hagemans

      Rob Hagemans - 2015-12-05

      Thanks! Looks like LOF should return a float rather than an unsigned int. Hadn't considered large files.

      Rob