[Info-vax] A SYS$ version of F$EDIT
Dave Froble
davef at tsoft-inc.com
Fri May 31 21:41:23 EDT 2019
On 5/31/2019 7:41 PM, seasoned_geek wrote:
> Admittedly it has been a long time since I wrote this book
>
> http://www.theminimumyouneedtoknow.com/app_book.html
>
> and it's Friday after a few Chardonnays, but given OpenVMS is being ported to x86 (and my feelings are widely known on that) the one thing they should add to make C not suck so much on the platform is a SYS$EDIT which mirrors F$EDIT in functionality.
>
>
> Just my 0.0002 cents worth.
>
Well, C is going to suck, whatever ....
So, what does F$EDIT do?
F$EDIT
Edits the character string based on the edits specified in the
edit-list argument.
Format
F$EDIT(string, edit-list)
edit-list
Specifies a character string containing one or more of the
following keywords which specify the types of edits to be made
to the string:
Edit Action
COLLAPSE Removes all spaces or tabs.
COMPRESS Replaces multiple spaces or tabs with a single
space.
LOWERCASE Changes all uppercase characters to lowercase.
TRIM Removes leading and trailing spaces or tabs.
UNCOMMENT Removes comments.
UPCASE Changes all lowercase characters to uppercase.
Ok, useful. But, why don't we take a look at Basic's EDIT$() function?
EDIT$
The EDIT$ function performs one or more string editing
functions,
depending on the value of its integer argument.
Example
New_string$ = EDIT$(Old_string$, 48%)
str-var = EDIT$(str-exp, int-exp)
Values Effect
1% Trim parity bits
2% Discard all spaces and tabs
4% Discard characters: CR, LF, FF, ESC, RUBOUT, and NULL
8% Discard leading spaces and tabs
16% Reduce spaces and tabs to one space
32% Convert lowercase to uppercase
64% Convert [ to ( and ] to )
128% Discard trailing spaces and tabs
256% Do not alter characters inside quotes
Guess Basic doesn't like converting to lowercase. Can't have everything.
So, it seems mostly everything is already in VMS, one just needs to be
able to invoke it.
Having fun ....
:-)
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef at tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
More information about the Info-vax
mailing list