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 | COMMAND

Edit History

COMMAND

s = COMMAND

Home > Reference > System

Returns a string s containing the SmallBASIC startup command line options.

Example 1: SDL version (GUI)

Running the following line from the command line:

LINUX:   sbasicg -r test.bas abc xyz fileName
WINDOWS: sbasicg.exe -r test.bas abc xyz fileName

When “test.bas” is:

PRINT COMMAND

Will print “abc xyz fileName”

Note: When using the paramter -r in the above shown example, sbasicg will from now on always start the programm. If you want, that sbasicg starts again in edit-mode, please use the parameter -e

LINUX:   sbasicg -e test.bas
WINDOWS: sbasicg.exe -e test.bas

Example 2: Non-graphical console version (cygwin or linux)

Running the following line from the command line:

LINUX:   sbasic test.bas abc xyz fileName
WINDOWS: sbasic.exe test.bas abc xyz fileName

When “test.bas” is:

PRINT  COMMAND

Will print “abc xyz fileName”

Example 3: Use SPLIT to separate parameters

LINUX:   sbasicg -r test.bas abc xyz fileName
WINDOWS: sbasicg.exe -r test.bas abc xyz fileName

When “test.bas” is:

s = COMMAND()

split s, " ", parameters

print "First parameter : "; parameters[0]
print "Second parameter: "; parameters[1]
print "Third parameter : "; parameters[2]

' Output:
' First parameter : abc
' Second parameter: xyz
' Third parameter : fileName 
Code samples using COMMAND
dogstar5.bas   image demo.bas   irc-bot.bas   loadsavebmp.bas   palm_cli.bas   palmcli.bas   pdocview.bas   PRINTA_OKOK.bas   startrek.bas   startrek.bas   strlib.bas   TinyBASIC.bas   zacalc.bas  
System
CHAIN   COMMAND   CWD   DELAY   ENV   ENV   EXEC   EXPORT   FRE   HOME   IMPORT   INCLUDE   MAXINT   NIL   OPTION   PAUSE   PI   PROGLINE   RANDOMIZE   RUN   SBVER   SELF   STKDUMP   TROFF   TRON   UNIT  
This page was last edited on Tue, 30 May 2023 09:23:02 +0200 | 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.