See also:

NEXT, SST

 

 

START

Type: Command Operation

Description: START Definite Loop Structure Command: Begins START … NEXT and START … STEP definite loop structures.

Definite loop structures execute a command or sequence of commands a specified number of times.

START … NEXT executes a portion of a program a specified number of times.

The RPL syntax is this: xstart xfinish START loop-clauseNEXT

The algebraic syntax is this: START(xstart xfinish) loop-clause NEXT

START takes two numbers (xstart and xfinish) from the stack and stores them as the starting and ending values for a loop counter. Then the loop clause is executed. NEXT increments the counter by 1 and tests to see if its value is less than or equal to xfinish. If so, the loop clause is executed again. Notice that the loop clause is always executed at least once.

START … STEP works just like START … NEXT, except that it can use an increment value

other than 1. The RPL syntax is this: xstart xfinish START loop-clause xincrement STEP

The algebraic syntax is this: START (xstart xfinish) loop-clause STEP(xincrement)

START takes two numbers (xstart and xfinish) from the stack and stores them as the starting and ending values for the loop counter. Then the loop clause is executed. STEP takes xincrement from the stack and increments the counter by that value. If the argument of STEP is an algebraic or a name, it is automatically evaluated to a number.

The increment value can be positive or negative:

If positive, the loop is executed again when the counter is less than or equal to xfinish.

If negative, the loop is executed when the counter is greater than or equal to xfinish.

Access:

BRANCH START

( °is the left-shift of the Nkey).

Input/Output:

 

 

 

 

 

 

 

 

 

 

 

Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

 

 

 

 

 

 

 

START xstart

xfinish

 

 

NEXT

 

 

 

STEP

xincrement

 

 

STEP

'symbincrement'

 

FOR, NEXT,

 

 

 

See also:

STEP

 

 

 

 

 

 

 

STD

Command

 

 

Type:

 

 

Description: Standard Mode Command: Sets the number display format to standard mode. Executing STD has the same effect as clearing flags –49 and –50.

Standard format (ANSI Minimal BASIC Standard X3J2) produces the following results when displaying or printing a number.

Numbers that can be represented exactly as integers with 12 or fewer digits are displayed without a fraction mark or exponent. Zero is displayed as 0.

Numbers that can be represented exactly with 12 or fewer digits, but not as integers, are displayed with a fraction mark but no exponent. Leading zeros to the left of the fraction mark and trailing zeros to the right of the fraction mark are omitted.

All other numbers are displayed in scientific notation (see SCI) with both a fraction mark (with one number to the left) and an exponent (of one or three digits). There are no leading or trailing zeros.

In algebraic objects, integers less than 103 are always displayed in standard mode.

3-234 Full Command and Function Reference