Re: how to convert variable name to a string?
- From: Terence <tbwright@xxxxxxxxx>
- Date: Sun, 13 Jul 2008 04:34:25 -0700 (PDT)
On Jul 12, 8:08 am, cowbee <weihuang1...@xxxxxxxxx> wrote:
dudes,
I could not find a way to convert a variable name to a string, or
convert a string to a variable name
e.g, character *100 x
real VAR1
x = "VAR1", how to use x to manipulate the VAR1?
best
Wei
I don't understand what you want to do.
If you want to convert the current value of a variable into a
chatacter string then you use the internal write command
WRITE(X,'format specifier') VAR1
where the format specifier is probably in the form Fw.d .
If it is the variable name itself you require as a string then
X='VAR1'
will form a 100 character length string with VAR1 as the first four
characters.
If you want to supply the contents
.
- Follow-Ups:
- Re: how to convert variable name to a string?
- From: fernando.qdf
- Re: how to convert variable name to a string?
- From: Ron Shepard
- Re: how to convert variable name to a string?
- References:
- how to convert variable name to a string?
- From: cowbee
- how to convert variable name to a string?
- Prev by Date: Re: defined operator & assignment speed & memory usage problem
- Next by Date: Re: Trying to use a logical as an array index
- Previous by thread: Re: how to convert variable name to a string?
- Next by thread: Re: how to convert variable name to a string?
- Index(es):
Relevant Pages
|