GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Download
  • News
  • Community
  • Resources
  • Language Reference
  • SmallBASIC Manual

This view

  • Original page
  • New address

GeezerVison is showing smallbasic.github.io — SmallBASIC | LINEINPUT

Edit History

LINEINPUT

LINEINPUT [#fileN,] var

Home > Reference > Console

Reads a whole text line from file or console and stores it in the string var. If a file handle #fileN is specified, LINEINPUT will read from the corresponding file otherwise it will read from the console.

Example 1: Read from console

LINEINPUT S
PRINT S

Example 2: Read from file

' create a file
open "File.txt" for output as #1

print #1, "First line"
print #1, "Second line"

close #1


' open file and print content
open "File.txt" for input as #1

LINEINPUT #1, S
Print S
LINEINPUT #1, S
Print S

close #1
Code samples using LINEINPUT
cgi_counter.bas   coordplot.bas   counter.bas   esoteric.bas   new help.bas   palm_cli.bas   palmcli.bas   radish.bas   tabs2spaces.bas   tracklog.bas   typewriter with sound effects.bas   typewriter.bas   water.bas   zacalc.bas  
Console
AT   BEEP   CAT   CLS   DEFINEKEY   FORM   INKEY   INPUT   LINEINPUT   LINPUT   LOCATE   LOGPRINT   NOSOUND   PEN   PLAY   PRINT   SOUND   TAB  
This page was last edited on Tue, 12 Sep 2023 19:20:08 +0930 | Markdown processed with pandoc 3.1.12.1
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.