- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can get a multiline message box by including
in the text.
But this doesn't work if I want to buld the message text from a combination of smaller text items.
I'm sure there must be a way to do this.
Thanks,
David
The first example gives:
This is line 1
This is line 2
The second example gives:
This is line 1 This is line 2
But this doesn't work if I want to buld the message text from a combination of smaller text items.
I'm sure there must be a way to do this.
Thanks,
David
msg='This is line 1 This is line 2'c iret=MessageBox(0,msg,'Title'c,MB_ICONINFORMATION) msg='This is line 1 '//'This is line 2'c iret=MessageBox(0,msg,'Title'c,MB_ICONINFORMATION)
The first example gives:
This is line 1
This is line 2
The second example gives:
This is line 1 This is line 2
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here's how I do it:
CHARACTER(2), PARAMETER :: CRLF = CHAR(13)//CHAR(10)
...
msg = 'This is line 1'//CRLF//'This is line 2'C
You can even build up the line across several statements like this:
msg = 'This is line 1'
msg = trim(msg)//CRLF//'This is line 2'C
Note that only the last line uses the C string type - alternatively you could concatenate CHAR(0).
Steve
CHARACTER(2), PARAMETER :: CRLF = CHAR(13)//CHAR(10)
...
msg = 'This is line 1'//CRLF//'This is line 2'C
You can even build up the line across several statements like this:
msg = 'This is line 1'
msg = trim(msg)//CRLF//'This is line 2'C
Note that only the last line uses the C string type - alternatively you could concatenate CHAR(0).
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks,
David
David

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page