Post Reply 
HP-71B IMAGE and PRINT USING
07-05-2020, 07:12 PM
Post: #8
RE: HP-71B IMAGE and PRINT USING
(07-05-2020 02:30 PM)J-F Garnier Wrote:  
(07-05-2020 01:45 PM)rprosperi Wrote:  Possibly I$ was not initially allocated large enough? The OP says it was dimensioned to 150 chars, but JFG's at 256 works. Maybe it's that simple?
No, 150 char dim works as well and the image fields are correct for real values.
The problem is that a complex image field C(..,..) must be used if complex variables are used.
But I'm sure Garth already figured it out :-)

[Added:]
Here is a compact solution with complex fields and values:
Code:
10 DIM I$[150]
155 I$='6D.D,"Hz ",4(3X,K,C(SDD.D,"dB",S3D,"'&CHR$(248)&'"))'
160 PRINT USING I$;250,"V3=",(2,-13),"V6=",(4,-27),"V6-V3=",(2,-14),"V7=",(-0,-44)

   250.0Hz    V3=( +2.0dB, -13ø)   V6=( +4.0dB, -27ø)   V6-V3=( +2.0dB, -14ø)   V7=( -0.0dB, -44ø)

J-F

This all reminds me of FORTRAN FORMAT statements, back in the day....

Requiring complex variables for a complex field makes perfect sense of course; the full listing (or at least a summary of the variable types) would have been a handy hint.

I had completely forgotten about the C( , ) enhancement in the MATH ROM, though I should have noticed it when looking at the manual recently after seeing your update.

Thanks for the compact solution demonstrating the 4( ) multiplier.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP-71B IMAGE and PRINT USING - rprosperi - 07-05-2020 07:12 PM



User(s) browsing this thread: 1 Guest(s)