GithubHelp home page GithubHelp logo

Comments (2)

robhagemans avatar robhagemans commented on September 3, 2024

Hi, apologies for the late response. I'm not sure I understand the issue you're reporting correctly as the program pasted is incomplete and doesn't run (AL should be defined; there needs to be a DEFSTR A for the first line to be syntactically correct, which implies AO is also a string, is that intended? line 6510 is undefined). Could you please include a working test case, including the outcome you see and the outcome you would have expected to see instead?

from pcbasic.

robhagemans avatar robhagemans commented on September 3, 2024

OK, I think this is what is meant:

test program

10 DEFSTR A
20 AL="TEST_SEQ.DAT"
65 OPEN "I",3,AL:O=1
66 IF EOF(3) THEN CLOSE 3:O=O-1:RETURN ELSE INPUT #3,O(O),O1(O),AO(O):O=O+1:GOTO 6510
6510 REM

outcome in PC-BASIC
Type Mismatch in 66

outcome in GW-BASIC
no error

The issue is that the INPUT implementation ignores the DEFSTR and tries to read AO as Single instead of Integer.
Thanks for the proposed code fix which resolves the issue, I'll include.

from pcbasic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.