Multi-Line Text String

Non-platform specific questions.

Multi-Line Text String

Postby jazz_e_bob » Sun Aug 21, 2005 4:26 am

This is an
example of
multi-line output

:?:

How would I define this as a string?

( In BASIC you would use myString = "This is an" & chr$(13) & "example of" & chr$(13) & "multi-line output". )

Thanks.
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby BeyondtheTech » Sun Aug 21, 2005 4:39 am

strcpy(text1,"This is an\nexample of\nmulti-line output.");

Be careful not to exceed 255 characters in an strcpy, as it crashes GE.
User avatar
BeyondtheTech
 
Posts: 270
Joined: Wed Mar 30, 2005 6:34 am
Location: Edison, NJ
Score: 4 Give a positive score

Postby jazz_e_bob » Sun Aug 21, 2005 6:08 am

Cheers mate.

:)
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron