CLI commands

The following are the commands and statements most frequently used with program files.
  • Save filename
    Writes to storage unit the program currently residing in memory. 
  • Load filename
    Loads the program from a storage unit into memory. LOAD deletes the current contents of memory before loading the program. 
  • Run
    Runs program present in memory. 
  • ! command
    Invokes the command processor of the shell to execute a command.
Example: 

! ls examples/*

examples/bg.bmp          examples/fact.bas          examples/parabola.bas
examples/bitmap.bas      examples/graph.bas         examples/ray.bas
examples/breakout.bas    examples/guess.bas         examples/readfile.bas
examples/breakout2.bas   examples/line.bas          examples/recursive.bas
examples/breakout3.bas   examples/minehunter.bas    examples/rosetta.bas
examples/calc.bas        examples/nutris.bas        examples/tictactoe.bas
examples/cartoon.bas     examples/nutris3D.bas      examples/walk.bmp
examples/code.bas        examples/nutrisbg.bmp


The complete list of CLI commands is the following


Command Syntax

Description

! shell_command

Executes shell command.

? [print_parameters, ...]

Executes Print instruction.

Apropos identifier

Searches a help content containing short descriptions of commands for keywords.

Break [line [IF condition]]

Sets up a breakpoint at line specified. With “IF condition” breakpoint becomes conditional (it stops program execution only if condition becomes true).

If no parameters are provided, Break shows active breakpoints and related lines of code.

Build

Compiles program (it is mainly useful for debugging purposes).

Clr

Clears all variables.

ClrBrk

Removes all breakpoints.

Cd <new directory>

Changes the current working directory.

Cont

Resumes program execution until your program completes, or stops on CTRL+C, or a breakpoint is hit.

Exec <program file>

Loads and runs a program file.

Exit

Exits the nuBASIC interpreter.

Grep <pattern>

Lists lines containing a match to the given pattern.

Help [language_keyword]

Provides a description about keyword. 
In case where keyword is not specified, shows the list of keywords, including commands, instructions functions and operators.

List [first][-last]

List [first-]

Lists all or part of a program.

Load filename

Loads a program file in memory.

New

Deletes the program currently in memory and clear all variables.

Pwd

Shows the current working directory.

Renum [increment(default=10)]

Renumbers program lines.

Run [line]

Executes the program currently in memory.

RmBrk line

Removes a breakpoint.

Save filename

Saves current program to file.

TrOff

Disables program tracing.

TrOn

Enables program tracing.

Ver

Prints out information about nuBASIC version.

Vars

Shows execution context information.

Meta

Shows meta information of program currently in memory.

Resume

This command is identical to Cont but it does not execute interrupted line, skipping it.

Comments