WIDTH not working?
This doesn't seem plausible, so maybe I'm doing something silly, but superficially WIDTH is not working for me in Matrix Brandy (Windows):
10 WIDTH 64 20 PRINT STRING$(255, "x")I expected this, but it isn't what I got:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >
0
Comments
-
It currently has no effect. I realised it when testing out stuff with your BBCZ80 release. It is on my to-do list.0
-
Update: it was trivially easy to implement in all implementations where POS works - that's all apart from the 'sbrandy' build. I've manually triggered the nighties build so they are now available as I type this.0
-
-
No, it has never worked upstream in any build. Bizarrely, the RISC OS build needed the biggest change, as it used to send the entire string as a single SYS call. Now, it does individual OSWRCH calls where I can check POS after each character and insert a CR/LF. The other builds called emulate_vdu in a loop, so again after each character it checks POS and inserts a CR/LF as necessary. (And yes, that was a typo. Nightlies.)0
-
-
There's a lot that doesn't work upstream, that I spent the past 6 years working on. It's now much more compatible than it ever used to be.0
-
There's a lot that doesn't work upstream, that I spent the past 6 years working on. It's now much more compatible than it ever used to be.
Indeed I would expect WIDTH to be one of the very first things to be implemented when writing a BBC BASIC interpreter (since it's associated with console output, without which a BASIC isn't much use!).
When was COUNT added to Brandy, was that in upstream or is it one of your additions? Adding COUNT without WIDTH (or WIDTH without COUNT) doesn't make much sense to me.
0 -
COUNT works, and testing on a build of upstream it works there too.
Regarding WIDTH, the docs used to say that it was ignored, indeed code was present to set and retrieve the value, but nothing actually used it. It does now0 -
COUNT works, and testing on a build of upstream it works there too.
Incidentally (although I expect you will consider this a low priority) Brandy seems to get confused when PRINTing a 'multi-line' string, i.e. one containing one or more embedded CRs, affecting the behaviour of TAB.
This example should print the exclamation point in the same line as "over the lazy dog", as shown in the screenshot from BeebEm, but Brandy prints it one line below (I've not tried it with the latest 'nightie', so if you've recently fixed it ignore this report):10 MODE 7 20 q$ = "The quick brown fox jumps" 30 q$ = q$ + CHR$(10) + CHR$(13) 40 q$ = q$ + "over the lazy dog..." 50 PRINT q$ TAB(24) "!"
0 -
Another one for the to-do list - the upstream docs certainly says PRINT does leave a bit to be desired. It is better than it used to be....0
-
This is now resolved - the nightly build has been rebuilt.0