Loading ...
Sorry, an error occurred while loading the content.

Sequeentail File

Expand Messages
  • David
    fName$= Ship.ext open fName$ for output as #Hull print#Hull,HullID close#Hull end 1]#Hull well not close for me 2]how can I get Ship.ext to take an input
    Message 1 of 2 , Oct 31, 2012
    • 0 Attachment
      fName$="Ship.ext"
      open fName$ for output as #Hull
      print#Hull,HullID
      close#Hull
      end

      1]#Hull well not close for me

      2]how can I get "Ship.ext" to take an input from the keys


      Anyone have any help for me?

      Agee
    • Stefan Pendl
      ... First I think you are missing some spaces here between the command and the handle of the file. To get keyboard input you must use the INPUT command in a
      Message 2 of 2 , Nov 1, 2012
      • 0 Attachment
        Am 31.10.2012 22:33, schrieb David:
        >
        > fName$="Ship.ext"
        > open fName$ for output as #Hull
        > print#Hull,HullID
        > close#Hull
        > end
        >
        > 1]#Hull well not close for me
        >
        > 2]how can I get "Ship.ext" to take an input from the keys
        >
        >
        > Anyone have any help for me?
        >

        First I think you are missing some spaces here between the command and
        the handle of the file.

        To get keyboard input you must use the INPUT command in a loop as shown
        below.
        To finish entering values enter the value -1, if -1 is a valid ID value
        use any other invalid ID value.

        If that isn't what you requested, post more details of what you like to
        accomplish.


        '---code start (watch for line wraps)

        fName$="Ship.ext"
        open fName$ for output as #Hull
        do
        input "Enter Hull ID: "; HullID

        if HullID = -1 then exit do

        print #Hull, HullID
        loop until HullID = -1
        close #Hull
        end

        '---code end

        --
        Stefan Pendl
        http://stefanpendl.runbasichosting.com/

        LB 4.04 Pro ... http://www.libertybasic.com/assist.html
        LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

        LB Community Wiki .............. http://basic.wikispaces.com/
        LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
        LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

        Books at http://www.lulu.com/ and http://www.amazon.com/
        Alyce Watson ... APIs for Liberty BASIC
        Carl Gundel .... Beginning Programming with Liberty BASIC

        Windows 7 Home Premium 64-bit SP1
        AMD Turion X2 RM-70 2GHz, 4GB RAM
      Your message has been successfully submitted and would be delivered to recipients shortly.