RE: Re: GCIC Fullscreen applications Replace algorythm
"Joe Monk" <[email protected]>
| Newsgroups | gmane.comp.emulators.hercules390.vm |
|---|---|
| Message-ID | <[email protected]> |
Rocky If you are looking for a slash then the find string would be two slashes together! Joe From: [email protected] [mailto:[email protected]] On Behalf Of Rocky Sent: Monday, August 09, 2010 6:05 AM To: [email protected] Subject: RE: [H390-VM] Re: GCIC Fullscreen applications Replace algorythm Joe I write a ton of assenbler I would never remember to TRUNC 72 if it was not the default That would shift in numbers from column 73 which are a pain to get rid of and shift out continuation characters which are hard to find. For sure assmbler must default to 72, don't know about subtleties of the other lanuages BOUnds TRUNC ZONE - whatever you call it it is more or less the same idea, How about the / character in the find command. what if I am looking for a slash what is the alternate character \ back slash ROC _____ From: [email protected] [mailto:[email protected]] On Behalf Of Joe Monk Sent: Monday, August 09, 2010 13:38 To: [email protected] Subject: RE: [H390-VM] Re: GCIC Fullscreen applications Replace algorythm Rocky - I would have a "bounds" function that would set the column boundaries for ALL functions. You can default this from the file type, or just set it to 80 for F, or lrecl for V. Then when doing a "replace", replace within those boundaries and trunc to the right. If you do trunc, make sure and tell the user. Don't try to subjectively "guess" as to what to do. Make the user tell you. Joe -----Original Message----- From: [email protected] <mailto:H390-VM%40yahoogroups.com> [mailto:[email protected] <mailto:H390-VM%40yahoogroups.com> ] On Behalf Of Rocky Sent: Monday, August 09, 2010 12:05 AM To: [email protected] <mailto:H390-VM%40yahoogroups.com> Subject: [H390-VM] Re: GCIC Fullscreen applications Replace algorythm I threw this question out yesterday but have had no specific suggestions as to how the REPALCE alogrythm should work when one the replacing field is larger or smaller than the field being replaced. When it is smaller than the filed it is replacing what do we do? replace the field and PAd with blanks or shift the entire line is there a trunc function needed Blanks are valid arguments for Replace and search. But they may also have a special delimiting function. What do we do when the replacing field is larger Do we just shift the whole record from that point Do we have a trunC position that stops the shifting Do we arbitarily shift out the last position of the record. Do we remove Blanks in the middle and leave as much unchanged as possible. In the absence of an algorythm I will not waste any more time on this If no one has thoughts I will add a trunc position that will default to 72 but that can be changed and I will just shift the whole line to the right or left from where the string is found. That is the easiest logic though not necessarily the best. If I have to shift anything other than blanks out of the record it will be an error Message will be: Some records not replaced ------------------------------------ Yahoo! Groups Links