TScript is driving me crazy

jcupp

Grizzled Veteran
This code taken from the ToasterScriptDocs3 crashes my VT

Code:
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

Grizzled Veteran
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

New member
....well the world is a CASE sensitive PLACE!!!
(used to drive me crazy when i learned JAVA)
 

Hopper

Fórum áss clówn
Well, it could be worse. It could use COBOL syntax and require you to type your code in ALL CAPS. yuk... :)
 

ssdcinc

New member
Hopper said:
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

Grizzled Veteran
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.
 
Top Bottom