There seems nothing wrong with these statements, so I suspect you have somewhere else a problem.
Where is this code resided? In a cgi-wrapper or in a .html file? Or....
WebSpeed SpeedScript is the same as Progress ABL (or 4GL depending on version and nostalgy). So any code which compiles in a normal procedure will compile in your webspeed programs as well. Same compiler, same language.
Casper.