- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have small dialog project with an edit control into which I want to post formatted multi-line messages with place holders. For example, a message might be:
6 Files were successfully loaded.
File Stub: (some string)
where bold text represent dynamic content. I tried write statements to a character variable with slashes (/) - that generates and error -forrtl: severe (27): too many records in I/O statement. I thought of using a resource in a string table like "%n Files were successfully loaded.\nFile Stub: %s", but not sure how to use LoadString to supply the variables as arguments to fill in the % place holders.
Any suggestions?
Ted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Swap the char(..)'s
CRLF is char(13)//char(10)
LFCR is char(10)//char(13)
Generally from a console app (CMD window), the order of CR and LF does not matter.
Windows dialog box may be goofy in this respect.
Jim Dempsey
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Insert CR-LF pairs into the string where you want line breaks. (Use A format.) Internal I/O won't do this for you on record boundaries (that starts a new array element.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Doc. I tried a number of things but haven't been successful (and thick apparently). I've attached captures of the dialog, properties and results of a test
This was one attempt to create two strings and concatenate them in DlgSet().
character(len=max_name_length):: stub, tempstr1, tempstr2 . . write(tempstr1,'(i2," RWB Files Selected Successfully")') nfiles write(tempstr2,'("File Stub:",A15)') TRIM(stub) retlog = DlgSet(gdlg, IDC_EDIT_PROCESS_RESULTS,TRIM(tempstr1)//char(10)//char(13)//TRIM(tempstr2)//char(0))
The results for one test should be:
8 RWB Files Selected Successfully File Stub: LFNL_R4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Swap the char(..)'s
CRLF is char(13)//char(10)
LFCR is char(10)//char(13)
Generally from a console app (CMD window), the order of CR and LF does not matter.
Windows dialog box may be goofy in this respect.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jim - thank you. Definitely goofy.

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