bs(1)

 

 

 

bs(1)

plot(12, x1, y1, x2, y2)

causes subsequent x (y) coordinates to be multi-

 

plied by x1 (y1) and then added to x2 (y2) before

 

they are

plotted.

The

initial scaling is

 

plot(12,

1.0,

1.0,

0.0, 0.0).

Some requests do not apply to all plotters. All requests except zero and twelve are implemented by piping characters to tplot.

Each statement executed from the keyboard re-invokes tplot, making the results unpredictable if a complete picture is not done in a single operation. Plotting should thus be done either in a function or a complete program, so all the output can be directed to tplot in a single stream.

last() in immediate mode, last returns the most recently computed value.

EXTERNAL INFLUENCES

Environment Variables

LC_COLLATE determines the collating sequence used in evaluating regular expressions.

LC_CTYPE determines the characters matched by character class expressions in regular expressions.

If LC_COLLATE or LC_CTYPE is not speci®ed in the environment or is set to the empty string, the value of LANG is used as a default for each unspeci®ed or empty variable. If LANG is not speci®ed or is set to the empty string, a default of "C" (see lang(5)) is used instead of LANG. If any internationalization variable contains an invalid setting, bs behaves as if all internationalization variables are set to "C". See environ(5).

International Code Set Support

Single-byte character code sets are supported.

EXAMPLES

Using bs as a calculator ($ is the shell prompt):

$ bs

#Distance (inches) light travels in a nanosecond. 186000 * 5280 * 12 / 1e9

11.78496

...

#Compound interest (6% for 5 years on $1,000). int = .06 / 4

bal = 1000

for i = 1 5*4 bal = bal + bal*int bal - 1000

346.855007

...

exit

The outline of a typical bs program:

#initialize things: var1 = 1

open("read", "infile", "r")

...

#compute:

while ?(str = read)

...

next

#clean up:

close("read")

...

#last statement executed (exit or stop): exit

#last input line:

run

b

HP-UX Release 11i: December 2000

− 7 −

Section 155