HP3000-L Archives

April 1998, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
John Korb <[log in to unmask]>
Reply To:
John Korb <[log in to unmask]>
Date:
Fri, 3 Apr 1998 11:45:32 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (55 lines)
At 09:09 AM 4/3/98 -0700, Bruce Toback wrote:
>John Korb writes:
>
>>   Is there a way to escape the "!" and indicate to GENMESSAGE that this "!"
>>   is not where a parameter is to be inserted, but is an "!" that is to be
>>   displayed?
>
>The obvious, if inelegant, solution is to define your own substitution
>character for !'s that are intended to remain in the message. If you use
>something with no meaning in HTML (say, an accent grave), you can simply
>scan the character string returned by GENMESSAGE and substitute in !'s
>for that character.
>

I'll probably end up doing just that, I was just hoping that someone knew
of an escape character for the old message catalogs so I wouldn't have to
perform the additional operation.

>>I'm using message catalogs (those created by MAKECAT.PUB.SYS, not the kind
>>created by GENCAT.PUB.SYS) in an application.  I need to use the older,
>>more flexible version (which uses MAKECAT and the GENMESSAGE intrinsic)
>>because the newer version is less flexible.
>
>I'm curious to know in what way the new NLS catalogs are less flexible
>than the old message catalogs. Other than the fact that MAKECAT-generated
>catalogs are also human-readable, I can't think of something you can do
>with GENMESSAGE that you can't also do with CATREAD.
>
>-- Bruce

The main reason is that most of the data to be inserted into the messages
is numeric (integer).  Since I'm coding in SPLash! I can simply pass the
parameter mask in octal to GENMESSAGE along with the numeric parameter, and
GENMESSAGE will insert the numeric into the message.  CATREAD dropped the
numeric parameter capability, so I have the additional steps of setting up
additional byte array buffers for the parameters, calling ASCII, and then
appending a null to the ends of the buffers.  It doesn't sound like much,
but it adds up over hundreds of calls, and at first there was no need for
imbedded "!" in the text, so the GENMESSAGE intrinsic was a closer match to
the requirements (it required less code).  Who knows, I may end up writing
a wrapper procedure to either CATREAD (to add the integer parameter and
double parameter capabilities) or to GENMESSAGE (to allow substitution of
"!" for some other character in the returned string).  If it comes to that,
the latter (GENMESSAGE) solution would require less code, so I'd probably
go in that direction.

John

--------------------------------------------------------------
John Korb                            email: [log in to unmask]
Innovative Software Solutions, Inc.

The thoughts, comments, and opinions expressed herein are mine
and do not reflect those of my employer(s), or anyone else.

ATOM RSS1 RSS2