[Tutor] concatenating two variables
tonycervone
tonycervone@netzero.net
Mon, 22 Oct 2001 19:56:08 -0400
This is a multi-part message in MIME format.
------=_NextPart_000_000C_01C15B33.97B70BE0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I see how two strings(variables enclosed in quotation marks) can be =
concatenated, but I am having difficulty doing it with two variables =
representing strings in a print statement:
print variable + variable # this statement does not provide any =
spacing between the two strings, yet=20
I keep getting syntax errors whenever I try different combinations with =
quotation marks.=20
So, if variable1 =3D good and variable2 =3D dog a
print variable1 + variable2
outputs gooddog
How do I output good dog with the above print statement?
thanks.
tony
------=_NextPart_000_000C_01C15B33.97B70BE0
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=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I see how two strings(variables =
enclosed in=20
quotation marks) can be concatenated, but I am having difficulty doing =
it with=20
two variables representing strings in a print statement:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>print variable + =
variable #=20
this statement does not provide any spacing between the two strings,=20
yet </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial =
size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I keep getting syntax errors whenever I =
try=20
different combinations with quotation marks. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>So, if variable1 =
=3D good and =20
variable2 =3D dog a</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>print variable1 + =
variable2</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>outputs gooddog</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>How do I output good =
dog with the=20
above print statement?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>thanks.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>tony</FONT></DIV></BODY></HTML>
------=_NextPart_000_000C_01C15B33.97B70BE0--
----------------------------------------------------
Sign Up for NetZero Platinum Today
Only $9.95 per month!
http://my.netzero.net/s/signup?r=platinum&refcd=PT97