Re: a simple question about strings [message #27005] |
Mon, 08 October 2001 21:09 |
george.mccabe
Messages: 10 Registered: October 2001
|
Junior Member |
|
|
sean,
here are some examples of long string output with&without imbedded
linefeed characters,
astr='11111111111111111111111111111111111111111111111111111' +$
'22222222222222222222222222222222222222222222222222222'+$
'3333333333333333333333333333333333333333 and so on...'
print, astr
LF=string(10B)
astr='11111111111111111111111111111111111111111111111111111' +LF+$
'22222222222222222222222222222222222222222222222222222'+LF+$
'3333333333333333333333333333333333333333 and so on...'
print,format='("11111111111111111111111111111111111111111111111111111 ",/,'+$
' "22222222222222222222222222222222222222222222222222222",/,'+$
' "3333333333333333333333333333333333333333 and so
on...")'
best of luck,
george
"Sean Raffuse" <sean@me.wustl.edu> wrote in message news:<9pt7ro$krc$1@newsreader.wustl.edu>...
> Hello.
>
> I'm trying to format some data into one long line of various types of data.
>
> My simple problem is that I am out of room to write the code on one line.
> Normally, you can use the '$' to continue your code on the next line.
> However, this does not work inside strings. Is there an analogous character
> or magic combination of characters that does the same thing? If not, how
> can I format my ridiculously long and complex output?
>
> Thanks in advance.
>
> -Sean Raffuse
|
|
|
Re: a simple question about strings [message #27008 is a reply to message #27005] |
Mon, 08 October 2001 18:25  |
Kristine Hensel
Messages: 26 Registered: June 1999
|
Junior Member |
|
|
Sean Raffuse wrote:
>
> Hello.
>
> I'm trying to format some data into one long line of various types of data.
>
> My simple problem is that I am out of room to write the code on one line.
> Normally, you can use the '$' to continue your code on the next line.
> However, this does not work inside strings.
long_string = 'kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk' + $
'kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk' + $
'kkkkkkkkk'
At least, that's how emacs does it for me.
Kristine (very pro-emacs today)
--
Kristine Hensel
Environmental Systems & Services Phone: +61-3-9835-7901
20 Council St.
Hawthorn East, VIC 3123 Australia e-mail: kristine@esands.com
|
|
|
Re: a simple question about strings [message #27011 is a reply to message #27008] |
Mon, 08 October 2001 15:30  |
R.G.S.
Messages: 46 Registered: September 2000
|
Member |
|
|
Sean Raffuse <sean@me.wustl.edu> wrote in message
news:9pt7ro$krc$1@newsreader.wustl.edu...
> Hello.
>
> I'm trying to format some data into one long line of various types of
data.
>
> My simple problem is that I am out of room to write the code on one line.
> Normally, you can use the '$' to continue your code on the next line.
> However, this does not work inside strings. Is there an analogous
character
> or magic combination of characters that does the same thing? If not, how
> can I format my ridiculously long and complex output?
>
> Thanks in advance.
>
> -Sean Raffuse
>
I probably am misunderstanding you, but how about:
ridiculouslylong1 = ' ballksjdfljasldfkjalksfjdlkajsd lkasjdf ;lkajsdf lk
;alkdsfj '
rl2= ' ballksjdfljasldfkjalksfjdlkajsd lkasjdf ;lkajsdf lk ;alkdsfj '
rl3 = 'ballksjdfljasldfkjalksfjdlkajsd lkasjdf ;lkajsdf lk ;alkdsfj '
rl4 = 'ballksjdfljasldfkjalksfjdlkajsd lkasjdf ;lkajsdf lk ;alkdsfj '
rl5 = ' ballksjdfljasldfkjalksfjdlkajsd lkasjdf ;lkajsdf lk ;alkdsfj
formatstring = ridiculouslylong1 +rl2 +rl3 etc..
-bob
|
|
|