[Tutor] String as a Variable?

Seelinger, Bruce bseelinger@neteffectcorp.com
Fri, 2 Feb 2001 10:52:14 -0500


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C08D30.1CF02260
Content-Type: text/plain;
	charset="iso-8859-1"

Another newbie question...

Is there a way to have a string represent a variable.

For eaxample, I have a the following:

<snip>

serial_number = '3'
print 'ip_address_serial_' + serial_number
ip_address_serial_3

Now I want to use the string ip_address_serial_3 to pull
the value assigned to the variable of the same name.

How can I represent the string as a variable?

Thanks in advance.




------_=_NextPart_001_01C08D30.1CF02260
Content-Type: text/html;
	charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2652.35">
<TITLE>String as a Variable?</TITLE>
</HEAD>
<BODY>

<P><FONT FACE="Times New Roman">Another newbie question...<BR>
<BR>
Is there a way to have a string represent a variable.<BR>
<BR>
For eaxample, I have a the following:<BR>
<BR>
&lt;snip&gt;<BR>
<BR>
serial_number = '3'<BR>
print 'ip_address_serial_' + serial_number<BR>
ip_address_serial_3<BR>
<BR>
Now I want to use the string ip_address_serial_3 to pull<BR>
the value assigned to the variable of the same name.<BR>
<BR>
How can I represent the string as a variable?<BR>
<BR>
Thanks in advance.<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C08D30.1CF02260--