[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Upper/Lower
- Subject: Re: Upper/Lower
- From: "Matthew F. Reagan" <mreagan@FAST.NET>
- Date: Thu, 21 Mar 1996 23:20:33 -0500
>Staying within SQR is definitly preferable, both in order to avoid opening a
>new cursor and so that the SQR program can be portable across databases.
>It would be nice if MITI added a "proper"/"initcap" function to the
>language for those situations when you want to capitalize all the words in
>a string (rather than just the first one), such as printing a $variable as a
>title of a report.
Gee, Nathan, I smell an article. One of the really powerful capabilities
of SQR is the ability to add user written functions. Write a function in
C, add it to ufunc.c, compile it, relink the SQR executable, and voila, you
have a new function that can be used in LET, WHILE, IF, etc. Just imagine:
let $newstring = initcap($oldstring)
This would be even better than Oracle's initcap function, in that SQR
doesn't care if it is a LONG datatype or not.
I haven't done this in years, and it was done in Vax C (not ANSI by a long
shot) on a Vax under VMS 5.5, but the basic capability still exists on all
platforms currently supported.
Has anyone done something similar? Can we assemble enough people to do it here?
The gauntlet has been thrown down... will someone accept the challenge? I
will dredge my old 8" floppies for the notes, if someone will volunteer the
C knowledge (of which I am sorely lacking).
Matt...