We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
wieso ist es in der deutschen Version so?
#1
Das hatte ich nicht erwartet. [Anhang=164][Anhang=164][Anhang=164]


Attached Files Thumbnail(s)
   
Reply
#2
Everything is correct.  Shy

Small Basic correctly understands in which case it sees a number, and in which case it was given a STRING OF CHARACTERS.
[-] The following 1 user Likes AbsoluteBeginner's post:
  • litdev
Reply
#3
Es geht nicht um den Unterschied zwischen Zahlen und Text. Es geht darum, dass statt 4 der Wert 4.00 ist. Wann werden Nachkommastellen ausgewiesen und wann nicht? Wovon ist es abhängig?

Z1 = 4.00
Z2 = 4
R1 = Z1 + Z2
TextWindow.WriteLine(Z1)
TextWindow.WriteLine(Z2)
TextWindow.WriteLine(R1)
R2 = Z1 * Z2
TextWindow.WriteLine(R2)
Z3 = "4.00"
R3 = Z2 + Z3
TextWindow.WriteLine(R3)

R3 wird mit Nachkommastellen ausgewiesen. Das liegt wohl daran dass Z3 mit Hockkomma als Text definiert wurde. Das ist was mich verwirrt.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)