Section Performing Math Operations

StampPlot can perform math operations above and beyond what the BASIC Stamp module can handle, including full floating point math. Here are some rules for using math:

• Math operations are enclosed in square brackets [ ].

• Only one operation per bracket.

• Math is performed inner bracket to outer bracket.

• Commas separate values and operators.

Take for example:

This will calculate and display in the status text box the value of 100 / 5 when entered.

Or, a little more complex:

Will calculate 100/5 - 20.

The BASIC Stamp module can send data formatted to have math operated on it prior to be being plotted or used in other ways:

'Plot sine wave

PAUSE 1000

DEBUG

CR,"!POBJ Clear",

. CR

DEBUG

"!NEWP",CR

DEBUG

"!PLOT ON",CR

DEBUG

"!SPAN -100,100",

. CR

DEBUG

"@TEXT 35a, 102a,

■ 2,

(BLUE),

StampPlot Math!"

, CR

x VAR Word

DO

FOR X = 0 TO 36 0

' Plot sine value *

100

[[value,SIN],*,100]

DEBUG "[[",SDEC x,"

,SIN],

, *,100]",CR

PAUSE 100

NEXT

LOOP

Solar Power Sensation V2

Solar Power Sensation V2

This is a product all about solar power. Within this product you will get 24 videos, 5 guides, reviews and much more. This product is great for affiliate marketers who is trying to market products all about alternative energy.

Get My Free Ebook


Post a comment