Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 12 SEP 2001 10:13:03AM Oystein Reigem wrote:

Many times I've sat with source copied from postings on this site, painstakingly redoing indentation. But the solution is so simple: Open the html source and copy from that instead. The html source contains all the original tabs. You just have to remove all the codes with a global Search and Replace. I assume many of you have thought of this already, but at least I haven't.

(Now I believe some of you have programs that can redo indentation. I think they have been discussed on the lists, but I never took the time to follow up the leads. And anyway - running the source through such a program takes as much time as my method. Also you might have reasons for wanting the author's original indentation.)

But I think we all should master the art of posting whitespace properly. Often we want feedback on the source we post, and then it's important the code is readable. We cannot expect others to take the time redoing our indentation. I like helping when I can, but when I see a posting with reams of unindented code I often skip to the next one.

To post source with whitespace you must enclose the source with <code> and </code> html codes. E.g, put the string <code> on a line before your source and the string </code> after the source. One additional piece of information, for those of you who've never made a posting containing html codes to this site: When posting to this site you must enclose html codes with square brackets, or else they won't be interpreted as html codes. So in addition to what I just said you must have square brackets around the <code> and </code> strings. I cannot show it to you for obvious reasons. (An alternative may have occured to some of you: to post source with whitespace as html entities. But I don't think that works. Even if they are surrounded with square brackets.) - Oystein - </QUOTE> —- === At 12 SEP 2001 12:05PM Don Miller - C3 Inc. wrote: === <QUOTE>Oystein .. Point well taken Don </QUOTE> —- === At 12 SEP 2001 05:19PM Oystein Reigem wrote: === <QUOTE>Damn! Here's a correct version. I hope! Many times I've sat with source copied from postings on this site, painstakingly redoing indentation. But the solution is so simple: Open the html source and copy from that instead. The html source contains all the original tabs. You just have to remove all the codes with a global Search and Replace. I assume many of you have thought of this already, but at least I haven't. (Now I believe some of you have programs that can redo indentation. I think they have been discussed on the lists, but I never took the time to follow up the leads. And anyway - running the source through such a program takes as much time as my method. Also you might have reasons for wanting the author's original indentation.) But I think we all should master the art of posting whitespace properly. Often we want feedback on the source we post, and then it's important the code is readable. We cannot expect others to take the time redoing our indentation. I like helping when I can, but when I see a posting with reams of unindented code I often skip to the next one. To post source with whitespace you must enclose the source with <code> and </code> html codes. E.g, put the string <code> on a line before your source and the string </code> after the source. One additional piece of information, for those of you who've never made a posting containing html codes to this site: When posting to this site you must enclose html codes with square brackets, or else they won't be interpreted as html codes. So in addition to what I just said you must have square brackets around the <code> and </code> strings. I cannot show it to you for obvious reasons. (An alternative may have occured to some of you: to post source with whitespace as html entities. But I don't think that works. Even if they are surrounded with square brackets.) - Oystein - </QUOTE> —- === At 12 SEP 2001 09:45PM Scott, LMS wrote: === <QUOTE>Hi All I tried to do tables once, I got it eventually but I think I had to put the square brackets around each individual tag. I tried (first) putting a square bracket at the start of my html and at the end of my html (on their own lines- even worse-like you do curly brackets in java classes) I found (can't remember where) but the <code> (preserve formatting tags) very helpfully included alot more white space than I intended, putting a blank line between every line that I wrote. Hmm think I will try an experiment now… <code> EXTRACT_DETAILS: * get details out of this_table_rec This_Volume = FIELD(this_table_rec, "*", 2) This_Table_Name=this_table_rec This_App = this_table_rec These_Indexes = this_table_rec num_indexes = COUNT_DELIM(These_Indexes, @VM) These_indexes_txt=' for idx_ptr=1 to num_indexes These_Indexes_txt := fmt(these_indexes, "L#15") next idx_ptr if percent_exists=No" then This_Table_Dos =this_table_rec This_DICT_Dos = this_table_rec This_Index_Dos = this_table_rec End Else This_Table_Dos =this_table_rec This_DICT_Dos = this_table_rec This_Index_Dos = this_table_rec End convert CRLF to " " in this_table_dos convert CRLF to " " in this_table_dos convert CRLF to " " in this_table_dos * extract the rev bit out pos_start = Index(this_table_dos, this_volume, 1) pos_start = pos_start + len(this_volume) + 1 * grab everything after the volume name this_table_dos=this_table_dospos_start, len(this_table_dos) * find the REV* bit, which might be after the FFFFFF bit pos_start=Index(this_table_dos, "REV", 1) this_table_dos=this_table_dospos_start, 11 pos_start = Index(this_DICT_dos, this_volume, 1) pos_start = pos_start + len(this_volume) + 1 this_DICT_dos=this_DICT_dospos_start, 11 pos_start = Index(this_Index_dos, this_volume, 1) pos_start = pos_start + len(this_volume) + 1 this_Index_dos=this_Index_dospos_start, 11 This_Table_LK_Dir = Dir( this_volume : "\" : this_table_dos) This_Table_LK_Size = This_table_LK_dir This_Table_LK_Date = Oconv(this_table_LK_dir, "D4/E") This_Table_Dos_OV = this_table_dos1, 9 : "OV" This_Table_OV_Dir = Dir( this_volume : "\" : this_table_dos_OV) This_Table_OV_Size = This_table_OV_dir This_Table_OV_Date = Oconv(this_table_OV_dir, "D4/E") RETURN </code> the code analyses the contents of a systables record for a report that lists every table name and all the associated dos file names - as best it can. There is a bit (left out) where the report tries to read a record from each table, which effectively opens the table and loads up volume and dos table info. It is vaguely equivalent to LISTMEDIA in AREV. I add a bit that extracted info into a flat file so I could print a report sorted by dos file name, ie given a dos file, find out what the LH table name is. It isn't perfect but it is very very handy… Scott </QUOTE> —- === At 12 SEP 2001 09:49PM Scott, LMS wrote: === <QUOTE>Yup, exactly as I thought. Lots of extra blank lines. I use IE which might be part of the problem. I can't use netscape at work, they have the special Microsoft Proxy server settings which buggers netscape. Scott. </QUOTE> —- === At 13 SEP 2001 03:29AM Oystein Reigem wrote: === <QUOTE>Scott, I forgot about those extra blank lines. It's not too much of a nuisance when you're just looking at source in postings, but it means extra work if you want to copy the source and need to get rid of the blank lines. What I'd do is either - copy the program source from the browser window - paste into Word (which I've always got running anyway)) - remove the extra blank lines in Word by doing a global Search and Replace from ^p^p to ^p - copy from Word - paste into System editor or, as I mentioned in an earlier posting - copy the program source from the html source - paste into System editor - remove the codes (which are the cause of the extra blank lines) by doing a global Search and Replace. (Hmmm. I think I'll go write anothor posting about what kind of Search and Replace capabilities we need in the new System Editor that Mike said they're working on.) - Oystein - </QUOTE> —- === At 13 SEP 2001 04:34AM Oystein Reigem wrote: === <QUOTE>Scott, I'm certain IE has got nothing to do with the extra lines. It's something that happens at Revelation's web server. It seems that when a posting is stored at the server a code is inserted at the end of each paragraph. And each line of source is a paragraph. Here's a possible way to fool the system (I'll check in a minute if it works): Post the source code as one long string with your own or codes between the original lines. NOTE! There's one problem with this approach. If the string gets too long (about a puny half a K) it gets chopped in two. So some source code lines will be broken and wrapped at seemingly random places, e.g, in the middle of a variable name. Another problem with Revelation's site software. I think I remember an example of this. That time it wasn't source code - just a long text paragraph. The word "failure" was broken in two, like f ailure Nice one. So don't post too large chunks of source with this method. Or divide it into suitable chunks. We can tolerate a few blank lines, can't we? :-) You also mentioned problems with postings html tables to this site. Once I had problems with that I think I ended up doing something similar to what I just suggested for source code - reformatting everything as one long string. Can't remember where I put those square brackets. - Oystein - </QUOTE> —- === At 13 SEP 2001 04:45AM Oystein Reigem wrote: === <QUOTE>Scott, See Test 3 for results. - Oystein - </QUOTE> —- === At 13 SEP 2001 07:32AM Revelation Software wrote: === <QUOTE>Oystein- (and Scott) Please stop testing your HTML posting procedures on the Online Discussion. If you must test, please try on the Private section in Works. Thanks </QUOTE> —- === At 13 SEP 2001 08:06AM Oystein Reigem wrote: === <QUOTE>Revelation, OK. If you remove the test postings please leave Test3. It's part of the discussion. Test and Test2 were total mistakes so I'd be happy to see them go. - Oystein - </QUOTE> —- === At 13 SEP 2001 08:50PM Scott, LMS wrote: === <QUOTE>Hi Rev I would use works but I have a slight funding problem - boss won't pay and I think I'll quit if I have to pay for it. I usually include a "test" as part of discussion of something relevant. Otherwise maybe you could post a white paper primer of how to get the effects of what we are looking for, ie how keep the formatting when posting code, how to format tables of results or instructions etc. Free text good for only so much. And Oystein, isn't all that extra formatting just as tedious as manually restoring the tabs and spaces that get eaten by the forum parser? Although I too would be a lot happier if we could make our forums posts more readable. I suppose underscores instead of spaces might work ___maybe? Scott </QUOTE> —- === At 14 SEP 2001 03:15AM Oystein Reigem wrote: === <QUOTE>Scott, A agree some visible character (string) like an underscore could work. I've sometimes posted source with tabs as ". " or "". The advantage of something like ". " is it doesn't disturb the visual appearance too much. So it's good when you just want to look at the source. The advantage of codey stuff like "" is it's unique and can be converted to real tabs with an unattended global Search and Replace. - Oystein - </QUOTE> View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/b7500532933dbeba85256ac5004e19b2.txt
  • Last modified: 2024/01/04 21:00
  • by 127.0.0.1