[Info-vax] VMS Software Q1 '23 Update

Stephen Hoffman seaohveh at hoffmanlabs.invalid
Tue Jan 31 11:16:08 EST 2023


On 2023-01-31 14:07:05 +0000, Simon Clubley said:

> I would not disagree with that. Having never really used DEC Basic, I 
> had forgotten about them until you brought them up.
> 
> Did they exist back in the V4 days when David started writing his code ?

VAX/VMS V3.x BASIC apps usually used integers, and used numeric strings 
via the VAX/VMS RTLs.

At that time (IIRC), the VAX decimal instructions were only "exposed" 
in COBOL and MACRO-32. And IIRC from the era of the OpenVMS port to 
Alpha, it was still only COBOL and MACRO-32.

Ported a BP2 system from PDP-11 running some mutt RSX-11M/M+ SYSGEN to 
VAX/VMS ~V3.2 and that eventually running DEC BASIC.

The app developer had used FP for cash all over the place. Also some 
other sorts of unsavory things. And not unexpectedly, the calculations 
were not working quite right. Particularly around sales tax. The 
accountants and billing folks and customers were all annoyed. Though my 
hat is off to the lawyer that kept sending in the corrected cash 
remittance for the bad-math bill they'd been receiving.

Ended up going to integers for most of the math, and to numeric strings 
when greater range was required.

Had considered going to multiple-precision integer math and skipping 
the string math, but the string math was (is) built-in and was working, 
and was fast enough for that app.

Now, I'd use quadwords / long long / int64_t for that stuff, or would 
use a bignum package. Quadword would have been enough for the cash 
involved in that app, and in most other cash-related apps.

~USD$184,467,440,737,095,516.15  / ~MXN$184,467,440,737,095,516.15  / 
€184.467.440.737.095.516,15 / etc.

OpenVMS still lacks native-API bignum support (past the string math), 
though the OpenSSL cryptographic library and other multiple-precision 
libraries can potentially be useful there.

I haven't seen much in the way of x86-64 app porting guidelines from 
VSI, but I suspect that's somewhat tangled with the ongoing 
compiler-porting work and related shake-out.



-- 
Pure Personal Opinion | HoffmanLabs LLC 




More information about the Info-vax mailing list