Flavors Technology, Inc. |
Paracell Users' Guide |
|
Here is a list of all keywords in the Paracell language and related information.
Examples of keyword use are provided under each keyword heading. In some instances, these examples are simple phrases, while in other sections are self-contained and can be compiled as a unit. Such sections of compileable code are shown in green.
Keywords that appear in red have recently been implemented in the latest release of the Paracell compiler. Further information will be added to these keywords shortly!
Word Type: article
Description: Denotes singularity in definitions.
Syntax:
Examples:
Generator is a Paracell Number.
x is a Machine Integer.
alarm is an array[3] of Machine Integers.
AngleArray is an array[1..4] of floats initially 0.
Related Topics | Definitions |
Word Type: Special Function
Description: Computes the absolute value of a number.
Syntax:
abs ({an expression})
abs {an expression}
Examples:
abs (x)
abs x
abs (y + x * z)
abs y + x * z /* this is the same as (abs y) + (x * z) */
If you did not understand the last example, see Operator Precedence.#foo is a local paracell number initially -3.1416.
#pi is a local paracell number initially 0.
#pi = abs(#foo). // #pi = 3.1416
Related Topics | Operators |
Exception Values propagation for abs
-RAIL | -OK | 0 | +OK | +RAIL | NAN | |
abs | +RAIL | +OK | 0 | +OK | +RAIL | NAN |
Word Type:
Description:
Syntax:
Examples:
PI is the constant 2 * acos 0. alpha is a floating point number initially 0. alpha = acos(1 / (sqrt 2)). // alpha = acos(.7071) = pi/4 rads = .7854 alphaDeg is a local floating point number initially 0. alphaDeg = (alpha * 360) / (2 * PI). // alphaDeg = acos(.7071) = 45 degrees
Word Type:
Description:
Syntax:
Examples:
#beta is a local paracell number initially 0. #beta = acosh(2). // #beta = 1.3170
Word Type: Command Verb (Assigner)
Description: Assigns the sum of the variable and a specified value to the variable.
Syntax:
add {an expression} to {a variable}
Examples:
Add 17 to x. /* this is the same as x = x + 17 */
Add y to x and z. /* this is the same as x = x + y; z = z +y */
Add y plus 17 to x. /* this is the same as x = x + (y + 17). */
pi is a paracell number initially 3.1416.
sum is a local machine integer initially 0.
if sum < 100
then add pi to sum // sum = 0,3,6,9...99,102,0,3,6,9...
else set sum to 0.
Related Topics |
Exception Values propagation for addition - OK
+ | -RAIL | -OK | 0 | +OK | +RAIL | NAN |
-RAIL | -RAIL | -RAIL | -RAIL | NAN | NAN | NAN |
-OK | -RAIL | -??? | OK | NAN | NAN | |
0 | -RAIL | -OK | 0 | +OK | +RAIL | NAN |
+OK | NAN | OK | +OK | +??? | +RAIL | NAN |
+RAIL | NAN | NAN | +RAIL | +RAIL | +RAIL | NAN |
NAN | NAN | NAN | NAN | NAN | NAN | NAN |
OK: a valid value within range of representation
???: an unknown valid value
RAIL: a value outside the range of representation
NAN: (Not A Number) a non-representable number or otherwise unknown
value
Word Type: Relational Operator
Description: An abbreviation of "isn't." Compares two values; Evaluates to true if the values are not the same, otherwise false.
Syntax:
{an expression} ain't {an expression}
Examples:
if x ain't 3 /* this is the same as if x isn't 3 */
then add y to x and z.
#bar is a local machine integer initially 0.
if #foo aint 10
then #bar = #bar + 1.
Related Topics |
Exception Values propagation for non-equivalence
ain't | -RAIL | -OK | 0 | +OK | +RAIL | NAN |
-RAIL | unknown | true | true | true | true | unknown |
-OK | true | OK | true | true | true | unknown |
0 | true | true | false | true | true | unknown |
+OK | true | true | true | OK | true | unknown |
+RAIL | true | true | true | true | unknown | unknown |
NAN | unknown | unknown | unknown | unknown | unknown | unknown |
Results:
OK: a valid value within range of representation (i.e., true or
false)
unknown: neither true nor false
Word Type: 1) Logical Operator; 2) conjuction
Description: 1) Performs the logical AND operation. 2) Connects parts of a sentence
Syntax:
{an expression} and {an expression}
{a noun}, {a noun}, ... and {a noun}
Examples:
x and y
If (x is 3) and (y is 4) then
then add y plus 17 to x.
x, y, and z are Paracell Numbers.
gamma is a machine integer.
If foo < pi
and beta > 1
then gamma is ON
else gamma is OFF.
Related Topics |
Exception Values propagation for operator AND
and | true | false | unknown |
true | true | false | unknown |
false | false | false | false |
unknown | unknown | false | unknown |
Word Type:
Description: These map directly into ACOS, ASIN, ATAN, and ATAN2 respectively.
Syntax:
Examples:
sqrt3 is a local float initially sqrt(3). AngleArray is an array[1..4] of floats. AngleArray[1] = arccos(.5). // 1.0472 rads = 60 degrees AngleArray[2] = arcsin(sqrt3 / 2). // 1.0472 rads = 60 degrees AngleArray[3] = arctan(2). // 1.1071 rads = 63.4 degrees AngleArray[4] = arctan2(-sqrt3, 0). // -1.5708 rads = -90 degrees
Word Type: Verb
Description: Declares existences of objects.
Syntax:
{variable name}, {variable name}, ... and {variable name} are {variable type}
Examples:
x, y, and z are Machine Integers.
Generator, Incubator, Inspector, and Inseminator are Machine Integers.
#one, #two and #three are local safe integers initially 1.
#two = 2.
#three = #one + #two. // #three = 3
Related Topics |
Word Type: collection type declarator
Description: Declares a variable type in definitions. Arrays maps directly into Array.
Syntax:
{a variable name} is an array[{array range}] of {variable type}.
Examples:
Generator is an array[10] of Paracell Number.
Truck is an array[5..10] of Machine Integer.
#myArrray is a local array[1..3] of machine integers initially 0.
Related Topics |
Word Type:
Description:
Syntax:
Examples:
#theta is a local paracell number initially 0. #theta = asin(.5). // #theta = asin(.5) = 2 * #pi / 13 radians #thetaDeg is a local paracell number initially 0. #thetaDeg = (#theta * 360) / (2 * #pi). // #thetaDeg = asin(.5) = 30 degrees
Word Type:
Description:
Syntax:
Examples:
phi = asinh(1). // phi = .8814
Word Type: Command Verb (Assigner)
Description: Assigns a value to a variable.
Syntax:
assign {an expression} to {a variable}
Examples:
Assign 5 to x. /* this is the same as x = 5. */
Assign Y + X * Z to Generator_1. /* same as: Generator_1 = Y + X * Z. */
assign phi to kappa. // the same as kappa = phi
Related Topics |
Word Type:
Description:
Syntax:
Examples:
#PI is the constant 3.1416. eta is a local floating point number initially 0. eta = atan(1). // eta = atan(1) = pi / 4 radians etaDeg is a floating point number initially 0. etaDeg = (eta * 360) / (2 * #PI). // etaDeg = atan(1) = 45 degrees
Word Type:
Description: Atan2 is used for atan( ) arguments expressed as a ratio of two numbers whose quotient is near pi/2, -pi/2, etc. It has better precision and maintains quadrant information.
Syntax:
Examples:
side1 is a float initially -1. side2 is a float initially .0001. epsilon is a float initially 666. epsilon = atan2(side1, side2). // -1.57 = -pi/2, or -90 degrees
Word Type:
Description:
Syntax:
Examples:
zeta = atanh(-.5). // zeta = -.5493
Word Type: Bitwise Operator
Description: Computes the bitwise AND operation of two binary values. This operator is available for variables of Machine Integer type only. To view the results in a debugger window in hex, preced the variable name with x), for example, x) #alpha.
Syntax:
{a binary value} bitand {a binary value}
Examples:
x bitand y
x bitand y + 32
foo is a machine integer initially 0x5555AAAA.
bar is a machine integer initially 0xFFFF0000.
alpha is a machine integer initially 0.
alpha = foo bitand bar. // alpha = 5555 0000
Related Topics |
Word Type:
Description:
Syntax:
Examples:
beta = bitnot #foo.
Word Type: Bitwise Operator
Description: Computes the bitwise inclusive OR operation of two binary values. This operator is available for variables of Machine Integer type only.
Syntax:
{a binary value} bitor {a binary value}
Examples:
x bitor y
x bitor 32
gamma = beta bitor bar.
Related Topics |
Word Type: Bitwise Operator
Description: Computes the bitwise exclusive OR operation of two binary values. This operator is available for variables of Machine Integer type only.
Syntax:
{a binary value} bitxor {a binary value}
Examples:
x bitxor y
x bitxor 32
#delta is a local machine integer initially 0.
#foo is a local machine integer initially 0xAAAA0000.
#bar is a local machine integer initially 0x0000AAAA.
#delta = #foo bitxor #bar. // #delta = AAAA AAAA
Related Topics |
Word Type:
Description: Booleans have only two values, true and false. Booleans maps directly into boolean.
Syntax:
Examples:
epsilon is a boolean initially true. if foo = bar then epsilon is true else epsilon is false.
Word Type:
Description:
Syntax:
Examples:
zeta is a safe integer initially 0. if zeta < 100 then increment zeta by 3 else clear zeta.
Word Type:
Description: The ceiling produces the smallest integer that is greater than its argument.
Syntax:
Examples:
fourThirds is a float initially 1.3333. eta is a machine integer initially 0. eta = ceiling(fourThirds). // #eta = 2.
Word Type: Command Verb
Description: Sets the value of a variable to zero.
Syntax:
Clear {a variable}
Examples:
Clear x. /* this is the same as x = 0 */
Clear x, y, and z.
theta is a machine integer initially 0.
if theta < 100
then increment theta by 3
else clear theta.
Related Topics |
Word Type:
Description:
Syntax:
Examples:
#PI is the local constant 2 * acos 0. TEN is the constant 10.
Word Type:
Description:
Syntax:
Examples:
#PI is the local constant 2 * acos 0. iota is a paracell number initially 0. iota = cos(#PI / 4). // iota = .7071
Word Type:
Description:
Syntax:
Examples:
#NEG_ONE is the local constant -1. kappa is a paracell number initially 0. kappa = cosh(#NEG_ONE). // kappa = 1.5431
Word Type:
Description: To get the degree glyph character, type control-Q then option-shift-8.
Syntax:
Examples:
#sixty is a local machine integer initially 60. lambda is a float initially 0. lambda = cot(#sixty)°. // lambda = .5774
Word Type:
Description:
Syntax:
Examples:
PI is the constant 2 * acos 0. mu is a paracell number initially 0. mu = csc(PI / 3). // mu = csc(60°) = 2/sqrt3) = 1.1547
Word Type: Command Verb (Setter)
Description: Subtracts a value from a variable. The value to be subtracted can be specified by the keyword, "by". If there is no specified value, one is subtracted.
Syntax:
decrement {a variable}
decrement {a variable} by {a value}
Examples:
decrement count /* this is the same as count = count - 1. */
decrement a, b, and c decrement x by 5
nu is a safe integer initially 0.
if nu > 0
then decrement nu by 2
else nu = 200.
Related Topics |
Exception Values propagation for subtraction
+ | -RAIL | -OK | 0 | +OK | +RAIL | NAN |
-RAIL | NAN | NAN | -RAIL | -RAIL | -RAIL | NAN |
-OK | NAN | OK | -OK | -??? | -RAIL | NAN |
0 | +RAIL | +OK | 0 | -OK | -RAIL | NAN |
+OK | +RAIL | +??? | +OK | OK | NAN | NAN |
+RAIL | +RAIL | +RAIL | +RAIL | NAN | +NAN | NAN |
NAN | NAN | NAN | NAN | NAN | NAN | NAN |
Word Type: Command Verb (Setter)
Description: Sets the value of the variable to the ratio of the variable and a given value.
Syntax:
divide {a variable} by {an expression}
Examples:
divide x by 6 /* this is the same as x = x / 6. */
divide generator_1 by x. /* this is the same as
generator_1 = generator_1 / x */
#xi is a local paracell number initially 666.
divide #xi by -1. // #xi goes back and forth betwee 666 and -666.
Related Topics |
Exception Values propagation for divison
/ | -RAIL | -OK | -1 | -0.x | 0 | +0.x | +1 | +OK | +RAIL | NAN |
-RAIL |
NAN | NAN | +RAIL | +RAIL | NAN | -RAIL | -RAIL | NAN | NAN | NAN |
-OK |
NAN | +OK | +OK | +??? | NAN | -??? | -OK | -OK | NAN | NAN |
-ok |
0 | +OK | +ok | +??? | NAN | -??? | -ok | -OK | 0 | NAN |
0 |
0 | 0 | 0 | 0 | NAN | 0 | 0 | 0 | 0 | NAN |
+ok |
NAN | -OK | -ok | -??? | NAN | +??? | +ok | +OK | 0 | NAN |
+OK |
NAN | -OK | -OK | -??? | NAN | +??? | +ok | +OK | NAN | NAN |
+RAIL |
NAN | NAN | -RAIL | NAN | NAN | NAN | NAN | +RAIL | NAN | NAN |
NAN |
NAN | NAN | NAN | NAN | NAN | NAN | NAN | NAN | NAN | NAN |
Word Type: Arithmetic
Description: Computes the ratio of two numbers.
Syntax:
{an expression} divided by {a expression}
Examples:
x = x divided by y. /* this is the same as x = x / y. */
z = x divided by (y + 1) /* this is the same as z = x / (y + 1). */
#sixty is a local pnumber initially 60.
omicron is a paracell number initially 0.
omicron is abs(666 divided by #sixty). // omicron = 11.1.
Related Topics |
Exception Values propagation for divison
/ | -RAIL | -OK | -1 | -0.x | 0 | +0.x | +1 | +OK | +RAIL | NAN |
-RAIL | NAN | NAN | +RAIL | +RAIL | NAN | -RAIL | -RAIL | NAN | NAN | NAN |
-OK | NAN | +OK | +OK | +??? | NAN | -??? | -OK | -OK | NAN | NAN |
-ok | 0 | +OK | +ok | +??? | NAN | -??? | -ok | -OK | 0 | NAN |
0 | 0 | 0 | 0 | 0 | NAN | 0 | 0 | 0 | 0 | NAN |
+ok | NAN | -OK | -ok | -??? | NAN | +??? | +ok | +OK | 0 | NAN |
+OK | NAN | -OK | -OK | -??? | NAN | +??? | +ok | +OK | NAN | NAN |
+RAIL | NAN | NAN | -RAIL | NAN | NAN | NAN | NAN | +RAIL | NAN | NAN |
NAN | NAN | NAN | NAN | NAN | NAN | NAN | NAN | NAN | NAN | NAN |
Word Type:
Description:
Syntax:
Examples:
foo is a machine integer initially 0. if foo < 100 then foo = foo + 3 else clear foo.
Word Type:
Description: Endif is optional and can be used to create nested if statements that are easier to read.
Syntax:
Examples:
foo is a machine integer initially 0. if foo < 100 then foo = foo + 3 else clear foo endif.
Word Type: Relational Operator
Description: Compares the values of two expressions. If two values are equal, then evaluates to true, otherwise false.
Syntax:
{an expression} is equal to {an expression}
Examples:
if x is equal to 5 /* this is the same as: if x = 5 */
then add 17 to x.
bar is a machine integer initially 0.
if bar is equal to 0
then set bar to 100
else decrement bar.
Related Topics |
Exception Values propagation for non-equivalence
= | -RAIL | -OK | 0 | +OK | +RAIL | NAN |
-RAIL | unknown | false | false | false | false | unknown |
-OK | false | OK | false | false | false | unknown |
0 | false | false | true | false | false | unknown |
+OK | false | false | false | OK | false | unknown |
+RAIL | false | false | false | false | unknown | unknown |
unknown | unknown | unknown | unknown | unknown | unknown | unknown |
Results:
OK: a valid value within range of representation (i.e., true or
false)
unknown: neither true nor false
Word Type:
Description:
Syntax:
Examples:
#two is a local machine integer initially 2. alpha is a paracell number initially 0. alpha = exp #two. // alpha = 7.3891 = e^2
Word Type:
Description:
Syntax:
Examples:
if bar > 50 then beta is TRUE else beta is FALSE endif.
Word Type:
Description: Floats maps directly into float.
Syntax:
Examples:
#one is a local floating point number initially 1. gamma is a float initially 0. gamma = exp #one. // gamma = 2.7183
Word Type:
Description: Floor is the largest integer that is smaller than its arguement.
Syntax:
Examples:
#gamma is a local float initially 2 * acos 0. delta is a pnumber initially 0. delta = floor #gamma. // #delta = 3
Word Type:
Description:
Syntax:
Examples:
subtract delta from epsilon.
Word Type: Relational Operator
Description: Compares the values of two expressions. If the first expression is greater than the second value, then evaluates to true, otherwise false.
Syntax:
{an expression} is greater than {an expression}
Examples:
if x is greater than 5 /* this is the same as: if x > 5 */
then add 17 to x.
Related Topics |
Exception Values propagation for non-equivalence
= | -RAIL | -OK | 0 | +OK | +RAIL | NAN |
-RAIL | unknown | false | false | false | false | unknown |
-OK | true | OK | false | false | false | unknown |
0 | true | true | false | false | false | unknown |
+OK | true | true | true | OK | false | unknown |
+RAIL | true | true | true | true | unknown | unknown |
unknown | unknown | unknown | unknown | unknown | unknown | unknown |
Results:
OK: a valid value within range of representation (i.e., true or
false)
unknown: neither true nor false
Word Type:
Description: Forms the format of Conditional Sentences. Else and unknown parts may be omitted, if not needed.
Syntax:
if {a set of expressions}
then {a set of Commands}
else {a set of Commands}
unknown {a set of Commands}
Examples:
if x = 5
then add 17 to x
else add y to x and z,
add y plus 17 to x
unknown add y plus 17 plus 1 to x
endif.
beta is of type paracell number. gamma is a boolean initially true. delta is a pnumber. epsilon is a pnumber initially 99.99. if gamma is true and delta is unknown then delta = 1, beta = 1, epsilon = 99.99, gamma is false else epsilon = sqrt(epsilon), set beta to truncate(epsilon), delta = 1 / (1 - epsilon), gamma is true.
Related Topics | Conditional Sentences |
Word Type: Command Verb (Setter)
Description: Sets the value from a variable to the sum of the variable and a specified value. The value to be added can be specified by the keyword, "by". If there is no specified value, one is added.
Syntax:
increment {a variable}
increment {a variable} by {a value}
Examples:
increment count /* this is the same as count = count + 1. */
increment b and c by 5 /* this is the same as b = b + 5. c = c + 5. */
Related Topics |
Exception Values propagation for addition
+ | -RAIL | -OK | 0 | +OK | +RAIL | NAN |
-RAIL | -RAIL | -RAIL | -RAIL | NAN | NAN | NAN |
-OK | -RAIL | -??? | -OK | OK | NAN | NAN |
0 | -RAIL | -OK | 0 | +OK | +RAIL | NAN |
+OK | NAN | OK | +OK | +??? | +RAIL | NAN |
+RAIL | NAN | NAN | +RAIL | +RAIL | +RAIL | NAN |
NAN | NAN | NAN | NAN | NAN | NAN | NAN |
Word Type:
Description:
Syntax:
Examples:
#zeta is a local safe integer initially 0. if #zeta is greater than 100 then #zeta = 0 else increment #zeta.
Word Type:
Description:
Syntax:
Examples:
#zeta is a local safe integer initially 0. if #zeta is greater than 100 then #zeta = 0 else increment #zeta.
Word Type:
Description:
Syntax:
Examples:
theta and iota are safe integers initially 1. if theta is less than 16 and iota isn't 0 then increment theta, divide iota by theta else theta = 0, iota = 2000000000.
Word Type: Verb (Command Definition). Relational Operator
Description:
1. Declares the existence of a variable.
2. Compares two values; Evaluates to true if the values are the
same, otherwise false.
3. Assigns a value to a variable.
Syntax:
{a variable} is a {a variable type}
{a variable} is {an expression}
{a variable} is {an expression}
Examples:
Generator is a Paracell Number.
if Generator is 5 /* does Generator have a value of 5? */
then Generator is 10. /* assign 10 to the variable Generator */
theta and iota are safe integers initially 1. if theta is less than 16 and iota isn't 0 then increment theta, divide iota by theta else theta = 0, iota = 2000000000.
Related Topics |
Exception Values propagation for non-equivalence
= | -RAIL | -OK | 0 | +OK | +RAIL | NAN |
-RAIL | unknown | false | false | false | false | unknown |
-OK | false | OK | false | false | false | unknown |
0 | false | false | true | false | false | unknown |
+OK | false | false | false | OK | false | unknown |
+RAIL | false | false | false | false | unknown | unknown |
unknown | unknown | unknown | unknown | unknown | unknown | unknown |
Results:
OK: a valid value within range of representation (i.e., true or
false)
unknown: neither true nor false
Word Type: Relational Operator
Description: Compares two values; Evaluates to true if the values are not the same, otherwise false.
Syntax:
{a variable} isn't {an expression}
{a variable} is not {an expression}
Examples:
These are the only forms of "is not" that are allowed.
if x is not equal to y then z = x.
if x is not greater than y then z = y.
if x is not less than or equal to y then z = x.
Related Topics |
Exception Values propagation for non-equivalence
is not | -RAIL | -OK | 0 | +OK | +RAIL | NAN |
-RAIL | unknown | true | true | true | true | unknown |
-OK | true | OK | true | true | true | unknown |
0 | true | true | true | true | true | unknown |
+OK | true | true | true | OK | true | unknown |
+RAIL | true | true | true | true | unknown | unknown |
unknown | unknown | unknown | unknown | unknown | unknown | unknown |
Results:
OK: a valid value within range of representation (i.e., true or
false)
unknown: neither true nor false
Word Type: Relational Operator
Description: Compares two values; Evaluates to true if the values are not the same, otherwise false.
Syntax:
{a variable} isn't {an expression}
{a variable} is not {an expression}
Examples:
if x isn't 3
then add y to x and z.
theta and iota are safe integers initially 1. if theta is less than 16 and iota isn't 0 then increment theta, divide iota by theta else theta = 0, iota = 2000000000.
Related Topics |
Exception Values propagation for non-equivalence
isn't | -RAIL | -OK | 0 | +OK | +RAIL | NAN |
-RAIL | unknown | true | true | true | true | unknown |
-OK | true | OK | true | true | true | unknown |
0 | true | true | true | true | true | unknown |
+OK | true | true | true | OK | true | unknown |
+RAIL | true | true | true | true | unknown | unknown |
unknown | unknown | unknown | unknown | unknown | unknown | unknown |
Results:
OK: a valid value within range of representation (i.e., true or
false)
unknown: neither true nor false
Word Type:
Description:
Syntax:
Examples:
if iota / theta > 100 and it isn't nan then sigma is TRUE else sigma is FALSE. if iota / theta < 100 and it's known then tau is TRUE else tau is FALSE.
Word Type:
Description:
Syntax:
Examples:
omega is a paracell number initially .99. psi is a paracell number initially 1. if psi is known // known means not NAN then omega = omega * omega, psi = 1 / omega else #omega = .9999, psi = 1.
Next: Appendix:
Special Characters, Top: Table of
Contents
Flavors Technology,
Inc. |
Copyright© 1993-6 by Flavors Technology, Inc. All rights Reserved.