String problem
Adam Robertson
aroberts@orange.usyd.edu.au
Tue, 15 Jul 2003 16:14:09 +1000
This is a multi-part message in MIME format.
------=_NextPart_000_001C_01C34AEC.20080680
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Hi there.
I have a QUICK screen with this code:
let t_tempcover = getsystemval("PHTEMP") + "/tempcover.txt"
let t_str = "echo '^' >> " + t_tempcover
.
.
let t_cmdstr = substitute(t_str, &
(" " + trunc(unit_name of unit) + &
" - " + unit_code of c_assign_student ) )
run command t_cmdstr
All has been running fine, except now some of the string data in 'unit_name
of unit' contains brackets ie ( and )
This is causing the screen to crash with this error: syntax error at line
1: `(' unexpected
If I remove the brackets from the data, it works fine.
Is there any way I can fix this, allowing the brackets to stay in the data.
Thanks
Adam Robertson
Acting Database and Web Administrator
University of Sydney, Orange
Phone: 02 6360 5967 Fax: 02 6360 5590
mailto:aroberts@orange.usyd.edu.au
------=_NextPart_000_001C_01C34AEC.20080680
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D132430306-15072003><FONT face=3DArial size=3D2>Hi=20
there.</FONT></SPAN></DIV>
<DIV><SPAN class=3D132430306-15072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D132430306-15072003><FONT face=3DArial size=3D2>I have =
a QUICK=20
screen with this code:</FONT></SPAN></DIV>
<DIV><SPAN class=3D132430306-15072003><FONT face=3DArial =
size=3D2> =20
let t_tempcover =3D getsystemval("PHTEMP") +=20
"/tempcover.txt"<BR> let t_str =3D "echo '^' >> =
" +=20
t_tempcover<BR> .</FONT></SPAN></DIV>
<DIV><SPAN class=3D132430306-15072003><FONT face=3DArial =
size=3D2> =20
.</DIV></FONT></SPAN>
<DIV><SPAN class=3D132430306-15072003><FONT face=3DArial =
size=3D2> =20
let t_cmdstr =3D substitute(t_str, &<BR> =20
(" " + =
trunc(unit_name of unit) + &<BR> " - " + =
unit_code=20
of c_assign_student ) )<BR> run command=20
t_cmdstr<BR></FONT></SPAN></DIV>
<DIV><SPAN class=3D132430306-15072003><FONT face=3DArial size=3D2>All =
has been running=20
fine, except now some of the string data in 'unit_name of unit' contains =
brackets=20
ie ( and &=
nbsp;)</FONT></SPAN></DIV>
<DIV><SPAN class=3D132430306-15072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><FONT face=3DArial><FONT size=3D2><SPAN =
class=3D132430306-15072003>This is=20
causing the screen to crash with this error:</SPAN></FONT></FONT><FONT=20
face=3DArial><FONT size=3D2><SPAN =
class=3D132430306-15072003> syntax=20
error at line 1: `(' unexpected</SPAN></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT size=3D2><SPAN=20
class=3D132430306-15072003></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=3DArial><FONT size=3D2><SPAN =
class=3D132430306-15072003>If I remove=20
the brackets from the data, it works fine.</SPAN></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT size=3D2><SPAN=20
class=3D132430306-15072003></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=3DArial><FONT size=3D2><SPAN =
class=3D132430306-15072003>Is there any=20
way I can fix this, allowing the brackets to stay in the=20
data.</SPAN></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT size=3D2><SPAN=20
class=3D132430306-15072003>Thanks</SPAN><SPAN=20
class=3D132430306-15072003></DIV></SPAN></FONT></FONT>
<P><FONT face=3DArial size=3D2>Adam Robertson</FONT> <BR><FONT =
face=3DArial=20
size=3D2>Acting Database and Web Administrator<BR></FONT><FONT =
face=3DArial=20
size=3D2>University of Sydney, Orange</FONT> <BR><FONT face=3DArial =
size=3D2>Phone: 02=20
6360 5967 Fax: 02 6360 5590</FONT> <BR><FONT face=3DArial =
size=3D2><A=20
href=3D"mailto:aroberts@orange.usyd.edu.au">mailto:aroberts@orange.usyd.e=
du.au</A></FONT>=20
</P>
<DIV> </DIV></BODY></HTML>
------=_NextPart_000_001C_01C34AEC.20080680--