Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 04:41 25 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : right-justifying fields on display

     Page 2 of 2    
Author Message
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6781
Posted: 01:57pm 04 Aug 2024
Copy link to clipboard 
Print this post

There isn't an ISO standard specifically for the BASIC language now. There was something like it (defining syntax) but it was withdrawn in 1991. A replacement standard which did include some info on BASIC was also withdrawn.

The Dartmouth group tried to get a ANSI standard but eventually gave up, finally releasing True BASIC, which contains a lot of what they wanted in an ANSI standard. An early attempt at a standard in 1987 was roundly ignored by everyone as Microsoft had already had their version on millions of machines, which were then becoming obsolete.

There's no point in calling something a standard if it's the only member of the group. :)

MSX BASIC was probably more of a standard because several different manufacturers included it, Some included hardware extensions to it, but they were all upwardly compatible. That goes for MSX2 as well, it will still run MSX1 BASIC programs.

It still doesn't negate my point though, that PRINT USING is a dog and has rarely, if ever, appeared in ROM versions because of that.  :) Remember, MMBasic is ROM based, it's not a disk BASIC.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2075
Posted: 09:00pm 04 Aug 2024
Copy link to clipboard 
Print this post

  Mixtel90 said  ... PRINT USING ... has rarely, if ever, appeared in ROM versions ...


<pedant mode>
It was supported in Locomotive basic which was ROM based on the 3rd most popular 8bit machines of the middle 80s. Milions of the buggers.

Here's proof



</pedant mode>

your point about it being a  CPU hog is well made.

h
Edited 2024-08-05 07:06 by CaptainBoing
 
zeitfest
Guru

Joined: 31/07/2019
Location: Australia
Posts: 482
Posted: 04:11am 05 Aug 2024
Copy link to clipboard 
Print this post

yes I tried Courier New and it would work but it does not look good at larger sizes
Edited 2024-08-05 14:17 by zeitfest
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 04:52am 05 Aug 2024
Copy link to clipboard 
Print this post

No, it's not very pretty but is it possible to change fonts just for the numbers?

An alternative would be to search the web for mono-spaced fonts. You might find one that you like.

Bill
Keep safe. Live long and prosper.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6781
Posted: 07:14am 05 Aug 2024
Copy link to clipboard 
Print this post

I didn't know Locomotive BASIC had it. Trust Alan Michael Sugar Trading to be b*** awkward...   ;)

PRINT FORMAT$(2.99,"%0 10 g" to you too. :)


or.....


f$="     $$$$     ##### $$$ "
a$="No"
n=25.4
b$="ABC"
Print using$(f$, a$,n,b$)

Function using$(f$, a$,n,b$)
 Local o$,i,j,k
 o$=Space$(Len(f$))

 i=Instr(1,f$,"$")
 j=Instr(i,f$," ")-1
 k=j-Len(a$)
 MID$(o$,k)=a$

 i=Instr(j+1,f$,"#")
 j=Instr(i,f$," ")-1
 MID$(o$,i)=Str$(n)

 i=Instr(j+1,f$,"$")
 j=Instr(i,f$," ")-1
 k=j-Len(b$)
 MID$(o$,k)=b$

'Print ">"o$"<"
 using$ = o$
End Function


.
Edited 2024-08-05 17:56 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6097
Posted: 07:53am 05 Aug 2024
Copy link to clipboard 
Print this post

Other monospaced fonts in Windows are Lucida Console and Consolas
VK7JH
MMedit   MMBasic Help
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6781
Posted: 07:58am 05 Aug 2024
Copy link to clipboard 
Print this post

Lucidia Console is one of my favourites. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 339
Posted: 06:46pm 05 Aug 2024
Copy link to clipboard 
Print this post

  Mixtel90 said  
It still doesn't negate my point though, that PRINT USING is a dog and has rarely, if ever, appeared in ROM versions because of that.  :) Remember, MMBasic is ROM based, it's not a disk BASIC.


It's in TRS-80 Level II BASIC, Model III BASIC, Altair BASIC (ROM version), all in ROM. The TRS-80 was the most popular computer of 1978 and had more units being used than any other company. This means that PRINT USING wasn't rare at all in a ROM-based BASIC.
 
EDNEDN
Senior Member

Joined: 18/02/2023
Location: United States
Posts: 118
Posted: 03:20pm 06 Aug 2024
Copy link to clipboard 
Print this post

  toml_12953 said  
It's in TRS-80 Level II BASIC, Model III BASIC, Altair BASIC (ROM version), all in ROM. The TRS-80 was the most popular computer of 1978 and had more units being used than any other company. This means that PRINT USING wasn't rare at all in a ROM-based BASIC.


I just pulled up the TRS-80 Level II manual at:  http://www.akhara.com/trs-80/docs/model1/Level%20II%20BASIC%20Reference%20Manual%20(1979)(Radio%20Shack)(pdf).zip

On pages starting at 3-4 the 'Print Using' command is documented.   I was surprised they didn't include left and right justification of the numbers.   But other than that it did provide a lot of help getting things formatted properly.  

It would appear the author of the 'Print Using' envisioned it would be used heavily for printing checks.   There is a lot of emphasis on printing the $ sign immediately in front of the number and filling unused space with * characters.
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024