PDA

View Full Version : TScript is driving me crazy



jcupp
03-05-2008, 12:48 PM
This code taken from the ToasterScriptDocs3 crashes my VT


a=233

switch(a)
{ case 0
case 12
case 4
case 3
case 1 MessageBox(1)
case 2 MessageBox(2)
case 13 {
// Perform multiple lines
MessageBox(“13 is unlucky”)
}
case 14
default MessageBox(Default)
}

My own attempts at using the switch statement give me syntax errors.
Anyone have a guess what I might be doing wrong. Should there be break statements like C maybe?

jcupp
03-08-2008, 07:13 AM
The sample code still crashes but I managed to get my code to work. Let's just say there's a special place in hell for those who create programing languages that are case sensitive. :devil:

ssdcinc
03-08-2008, 10:30 AM
....well the world is a CASE sensitive PLACE!!!
(used to drive me crazy when i learned JAVA)

Hopper
03-08-2008, 11:08 AM
Well, it could be worse. It could use COBOL syntax and require you to type your code in ALL CAPS. yuk... :)

ssdcinc
03-08-2008, 11:56 AM
Well, it could be worse. It could use COBOL syntax and require you to type your code in ALL CAPS. yuk... :)


...or worse still RPG, forcing you to put things in specific columns
it as easier dealing with machie code even on mutiple platforms.

jcupp
03-08-2008, 09:39 PM
Back in the day IU taught the CS100 classes in both COLBOL and Fortran. I went to the book store and leafed through the textbooks for both and COBOL looked like it involved way too much typing so I took the Fortran class and dodged that bullet.