[Info-vax] Programming languages on VMS
Johnny Billquist
bqt at softjar.se
Fri Jan 26 15:36:02 EST 2018
On 2018-01-24 18:26, Bill Gunshannon wrote:
> Given what it was designed for BASIC was never taken seriously. Even
> after ANSIfication it was still not overly practical as most versions
> were interpreted and not compiled. What data type of none-integer does
> BASIC support that can do calculations with decimals without the
> cumulative error common to floating point?
Is that a trick question?
BASIC can actually do arithmetic on strings, with arbitrary precision.
And that's been in several different BASIC dialects I've played with.
From the BP2 help:
FUNCTIONS
BUILT-IN
SUM$
The SUM$ function returns a string whose value is the sum of two numeric
strings.
Format
str-vbl = SUM$(str-exp1, str-exp2)
Example
600 Sigma$ = SUM$("234.444", A$)
You also have DIF$, PROD$ and QUO$.
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt at softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
More information about the Info-vax
mailing list