I have noticed in PC-BASIC that raising a number to a power of another number appears to cause a syntax error. I.E., PRINT 2**3 does not result in 8. Is there a different operand to use or does this mathematical function not work?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, the exponentiation operator is ^, so PRINT 2^3 will give what you are looking for. Have a look at http://pc-basic.org/doc/#operators for more information.
Hope this helps,
Rob
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "[CLOSED] General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
I have noticed in PC-BASIC that raising a number to a power of another number appears to cause a syntax error. I.E., PRINT 2**3 does not result in 8. Is there a different operand to use or does this mathematical function not work?
Hi, the exponentiation operator is
^
, soPRINT 2^3
will give what you are looking for. Have a look at http://pc-basic.org/doc/#operators for more information.Hope this helps,
Rob
View and moderate all "[CLOSED] General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Perfect! Thanks.