11.07.2015 Views

Here - 1000 BiT

Here - 1000 BiT

Here - 1000 BiT

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

RULE: You cannot do arithmetic with the numbers in strings.Correct:Wrong:Wrong:10 LET A = 3 + 710LETAS = 3 + 710 LET A = "3" + "7"If you run either of these wrong lines, the computer will print:TYPE MISMATCH ERROR IN 10There are two types of variables:number and string.You cannot put a number into a string box or a string into a number box.Enter10LETA=520LETB$="10"30 LET OA+BSLines 10 and 20 are OK, line 30 is wrong. What will the computer do when you run thislittle program?Try to guess what each of these statements will print, then enter the line to see whathappens:PRINT 5PRINT "5"PRINT "5+ 3"PRINT "5"+"3"PRINT5 + 3_62

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!