- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can someone please tell me why this will not give me a New Line (
) in a message box?
WRITE(message,'(A,I2,A)') 'Hole is less than 4" from end
of plate on section #',NR,CHAR(0)
iret = MESSAGEBOXQQ(TRIM(message),'Warning'C,MB$ICONEXCLAMATION.OR.MB$OK)
iret = MESSAGEBOXQQ(TRIM(message),'Warning'C,MB$ICONEXCLAMATION.OR.MB$OK)
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use the Windows API function messsagebox(Hwnd, Message, Title, MB_ICONHAND etc. etc.)
andI find that escape sequences like , in Message don't work in that function either!
( i am using WIndows 2000, CVF6.6c)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Escape sequences such as , etc work only if the containing string is appended with C in the code. e.g.
write(*,*) "First line Second line"C
(Note that this is a language extension). They do not work if you append char(0) by other means, such as WRITE or concatenation, e.g. the following is not equivalent:
write(*,*) "First line Second line"//char(0)
Compiler does not have a crystal ball to know how to interpret " ", i.e. whether you're going to append a char(0) or not.
In your case, you can simply use / format descriptor to obtain a new line. In more complex cases, consider sticking in char(13) or char(13)//char(10) (the latter is required for multi-line edit controls).
Jugoslav

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