Jump to content



0

Family BASIC/NS-HuBASIC help


4 replies to this topic

#1 Nikdog OFFLINE  

Nikdog

    Space Invader

  • 39 posts
  • Location:Milpitas, CA, US of A 95035-4621

Posted Sat Jan 15, 2011 6:52 PM

Is there no way to do exponents in Family BASIC/NS-HuBASIC?

print 2^2
Gives me a syntax error. I would work around it by having a*a instead of a^2, but then how am I to replace x^(1/2)?

#2 GroovyBee OFFLINE  

GroovyBee

    7800 Developer

  • 5,781 posts
  • Busy bee!
  • Location:North, England

Posted Sat Jan 15, 2011 6:59 PM

Does the BASIC support floating point?

#3 Nikdog OFFLINE  

Nikdog

    Space Invader

  • 39 posts
  • Location:Milpitas, CA, US of A 95035-4621

Posted Sat Jan 15, 2011 7:26 PM

I've never used floating point before, so I have no idea.

#4 GroovyBee OFFLINE  

GroovyBee

    7800 Developer

  • 5,781 posts
  • Busy bee!
  • Location:North, England

Posted Sat Jan 15, 2011 7:41 PM

A floating point number is a number like 2.678 e.g. it has a fractional part. The result of the arithmetic function x^.5 will be a floating point number.

#5 Nikdog OFFLINE  

Nikdog

    Space Invader

  • 39 posts
  • Location:Milpitas, CA, US of A 95035-4621

Posted Sun Jan 16, 2011 2:30 PM

Well how about that, I never noticed it didn't do decimals.

Print 2.678
Syntax Error
Print 2.6
Syntax Error
Print 1/2
0
Print 5/2
2

Gonna have to try the rom of version 3.

heh, same thing. More reason to get an MSX then.

Edited by Nikdog, Sun Jan 16, 2011 2:34 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users