Help.. Text strings

Neil Harvey neil@nha.co.za
Mon, 3 Jun 2002 07:27:10 +0200


This is a multi-part message in MIME format.

------_=_NextPart_001_01C20ABF.4F51B4E3
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Enclose the string you wish to echo in single ' s
=20
So let t_str =3D "echo '^ >> " + t_tempcover + "'"
=20
Regards
=20
Neil
=20

	-----Original Message-----
	From: Adam Robertson [mailto:aroberts@orange.usyd.edu.au]=20
	Sent: 03 June 2002 07:04 AM
	To: Powerhouse List (E-mail)
	Subject: Help.. Text strings
=09
=09
	I have a .qks file that I am tring to save some info out to a
text file.
	=20
	-----------
	temp t_cmdstr char*500
	temp t_str char*400
	temp t_tempcover char*100  ; temporary file name
=09
	    let t_tempcover =3D getsystemval("PHTEMP") + "/tempcover.txt"
	    let t_str =3D "echo ^ >> " + t_tempcover
=09
	    let t_cmdstr =3D substitute(t_str,  (assign_name of
assign_details ) )
	    run command t_cmdstr
	------------
	=20
	It works OK most of the time.
	The problem is when the value of (assign_name of assign_details
) contains an ampersand ("&")
	then it fails.
	=20
	=20
	How can I deal with the "&" in the data.
	=20
	Thanks
	=20
	Adam Robertson=20
	Acting Database and Web Administrator
	University of Sydney, Orange=20
	Phone: 02 6360 5967   Fax: 02 6360 5590=20
	mailto:aroberts@orange.usyd.edu.au=20
	=20


------_=_NextPart_001_01C20ABF.4F51B4E3
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2716.2200" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D044062505-03062002><FONT face=3DArial color=3D#0000ff =

size=3D2>Enclose the string you wish to echo in single ' =
s</FONT></SPAN></DIV>
<DIV><SPAN class=3D044062505-03062002><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D044062505-03062002><FONT face=3DArial color=3D#0000ff =
size=3D2>So let=20
t_str =3D "echo '^ &gt;&gt; " + t_tempcover + "'"</FONT></SPAN></DIV>
<DIV><SPAN class=3D044062505-03062002><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D044062505-03062002><FONT face=3DArial color=3D#0000ff =

size=3D2>Regards</FONT></SPAN></DIV>
<DIV><SPAN class=3D044062505-03062002><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D044062505-03062002><FONT face=3DArial color=3D#0000ff =

size=3D2>Neil</FONT></SPAN></DIV>
<DIV><SPAN class=3D044062505-03062002></SPAN>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
  <DIV></DIV>
  <DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr =
align=3Dleft><FONT=20
  face=3DTahoma size=3D2>-----Original Message-----<BR><B>From:</B> Adam =
Robertson=20
  [mailto:aroberts@orange.usyd.edu.au] <BR><B>Sent:</B> 03 June 2002 =
07:04=20
  AM<BR><B>To:</B> Powerhouse List (E-mail)<BR><B>Subject:</B> Help.. =
Text=20
  strings<BR><BR></FONT></DIV>
  <DIV><SPAN class=3D370585604-03062002><FONT face=3DArial size=3D2>I =
have a .qks file=20
  that I am tring to save some info out to a text =
file.</FONT></SPAN></DIV>
  <DIV><SPAN class=3D370585604-03062002><FONT face=3DArial=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D370585604-03062002><FONT face=3DArial=20
  size=3D2>-----------</FONT></SPAN></DIV>
  <DIV><SPAN class=3D370585604-03062002><FONT face=3DArial size=3D2>temp =
t_cmdstr=20
  char*500<BR></FONT></SPAN><SPAN class=3D370585604-03062002><FONT =
face=3DArial=20
  size=3D2>temp t_str char*400<BR>temp t_tempcover char*100&nbsp; ; =
temporary file=20
  name<BR></DIV></FONT></SPAN>
  <DIV><SPAN class=3D370585604-03062002><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;&nbsp;=20
  let t_tempcover =3D getsystemval("PHTEMP") +=20
  "/tempcover.txt"<BR>&nbsp;&nbsp;&nbsp; let t_str =3D "echo ^ &gt;&gt; =
" +=20
  t_tempcover<BR></FONT></SPAN></DIV>
  <DIV><SPAN class=3D370585604-03062002><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;&nbsp;=20
  let t_cmdstr =3D substitute(t_str,&nbsp; (assign_name of =
assign_details )=20
  )<BR>&nbsp;&nbsp;&nbsp; run command=20
  t_cmdstr<BR>------------</FONT></SPAN></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><SPAN class=3D370585604-03062002><FONT face=3DArial size=3D2>It =
works OK most=20
  of the time.</FONT></SPAN></DIV>
  <DIV><SPAN class=3D370585604-03062002><FONT face=3DArial size=3D2>The =
problem is=20
  when the value of (assign_name of assign_details ) contains an =
ampersand=20
  ("&amp;")</FONT></SPAN></DIV>
  <DIV><SPAN class=3D370585604-03062002><FONT face=3DArial size=3D2>then =
it=20
  fails.</FONT></SPAN></DIV>
  <DIV><SPAN class=3D370585604-03062002><FONT face=3DArial=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D370585604-03062002><FONT face=3DArial=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D370585604-03062002><FONT face=3DArial size=3D2>How =
can I deal=20
  with the "&amp;" in the data.</FONT></SPAN></DIV>
  <DIV><SPAN class=3D370585604-03062002><FONT face=3DArial=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D370585604-03062002><FONT face=3DArial=20
  size=3D2>Thanks</FONT></SPAN></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><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:=20
  02 6360 5967&nbsp;&nbsp; Fax: 02 6360 5590</FONT> <BR><FONT =
face=3DArial=20
  size=3D2><A=20
  =
href=3D"mailto:aroberts@orange.usyd.edu.au">mailto:aroberts@orange.usyd.e=
du.au</A></FONT>=20
  </DIV>
  <DIV>&nbsp;</DIV></BLOCKQUOTE></BODY></HTML>
=00
------_=_NextPart_001_01C20ABF.4F51B4E3--