HP3000-L Archives

April 2004, Week 4

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:
Paul Christidis <[log in to unmask]>
Reply To:
Date:
Mon, 26 Apr 2004 19:06:37 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (48 lines)
Dave,

Providing that 'RTF_CCTL' is a one byte string variable, the two statements
can be combined to:

      ECHO ___![ord(rtf_cctl)]!RTF_DATA

Some testing, looping 100 times, of the one vs two statement syntax, shows
an improvement of about 30% for the 'combined' statement.

Regards
Paul Christidis

HP-3000 Systems Discussion <[log in to unmask]> wrote on 04/26/2004
03:29:44 PM:

> Assuming that the variables have the correct values, and the following 2
> lines actually work, is it possible to combine them into one line, with
the
> ORD function inside the ECHO statement ?  If so, would it run any
faster??
>
> SETVAR  JUNK    ORD(RTF_CCTL)
> ECHO ![___!JUNK]!RTF_DATA
>
> This is from my HP2RTF conversion routine, where for example, when the HP
> report wants a new page, 'RTF_CCTL'  would be chr(49),  ___49 would be
> '\page ' (the rtf code for new page), and RTF_DATA would be the first
line
> of the new page.
>
> It works as shown, and is WAAAY faster than the old code:
>     IF RTF_CCTL = <a variable set to chr(49)>
>         ECHO \page RTF_DATA
>     ELSEIF    <repeat for single-spacing, double-spacing, etc>...
> but I thought it might be a bit faster with one line instead of two, and
no
> 'JUNK' variable.  This thing is still slower than I like, after every
tweak
> I can think of -- except actually (gasp!) switching to a compiled
language.
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2