Shop OBEX P1 Docs P2 Docs Learn Events
Exponents — Parallax Forums

Exponents

Bill HBill H Posts: 1
edited 2007-03-05 19:28 in BASIC Stamp
I'll introduce myself since i'm new...my name is Bill i'm an electronics tech in Canada but am fairly new to Stamps.
Can basic stamps do exponent numbers? I ran 10^2 in PBasic and the value 8 was returned.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-03-05 19:28
    The Basic Stamps are integer (16-bit signed) processors, so exponents aren't very useful as built-in operators. Use integer multiplication (*). The up-arrow operator (^) is used for bit-wise exclusive or and the double-asterisk operator (**) is used for multiple precision multiplication. There's a whole section in the manual on the numeric operators. Have a look at it.
Sign In or Register to comment.