Comments (11)
You can use Π in text sources.
from basicv2.
With following line: 10 print Π
console prints 3.14159265, but the output of compiled code is still 0.
BTW: The console accepts both forms of PI: the Greek Capital Letter Pi (Π, U+03A0, &Pi) and the Greek Small Letter Pi (π, U+03C0, &pi), which looks like the PI in Commodore Basic.
from basicv2.
You are right...strange. I guess I've never tested it in this context, because I really dislike the idea of having an extra symbol for PI in the first place hence I never use it but write 3.1415...directly. I'll have a look. Most likely some kind of encoding conversion issue...
from basicv2.
Should be fixed now.
from basicv2.
The function PI is now working :-)
But there is one little difference between compiler and console when printing character PI (print "π") with text files:
with compiled code it is printed as expected, but with console the is something like "|PI|".
Could you also fix this ?
from basicv2.
I'll have a look. That should actually happen inside strings only...
from basicv2.
I can't reproduce this. Can you give me an example, please?
from basicv2.
Here is the testprogram:
0 print chr$(126)
1 print "Π"
2 print "π"
With compiler and emulator there are 3 π printed, as expected.
But with console there is the output with bash (I use wsl):
$ ./run_gui.sh
com.sixtyfour.extensions.textmode.ConsoleSupport registered as a BASIC extension!
com.sixtyfour.extensions.graphics.GraphicsBasic registered as a BASIC extension!
3 commands compiled in: 56ms
~
{pi}
{pi}
The output for line 1 and 2 in the gui is the same as for 'print "{pi}"' , line 0 has correct output.
Sorry, I don't know how to add a screenshot.
from basicv2.
I see. That's actually "by design"...which doesn't mean, that it's a good design. I'll have a look at it...
from basicv2.
Should behave better now...
from basicv2.
Yes, now compiler and console have the same correct behavior :-)
from basicv2.
Related Issues (20)
- MOSSpeed jar file HOT 3
- Castle of Doom buggy after compilation HOT 4
- compiled code longer then source HOT 1
- Using absolute file path doesn't work in an unix like environment. HOT 7
- Many X16 samples do not compile with various "label not found" errors HOT 2
- print chr$( ) commands appear to be removed in compiled version HOT 9
- IndexOutOfBoundsException thrown in Integer Pass 1 HOT 2
- Interpreter: if condition wrong evaluation HOT 5
- Interpreter: Enhance compatibility for Robins new favourite C64 One-Liner HOT 8
- BasicShell: no INPUT for numeric variable possible HOT 2
- Console Support: add control codes for lower/upper case HOT 8
- BasicShell: Wrong output when PRINT with comma HOT 5
- Console: Wrong output when PRINT with comma HOT 2
- INPUT#/PRINT# problems when using for keyboard/screen HOT 1
- INPUT BUG: Workaround with SHIFT+SPACE and Controlcodes for Cursor movement doesn't work HOT 5
- Loading PRG files works only with compiler HOT 6
- GUI has two different sizes HOT 10
- BasicShell: no run with linenumber HOT 5
- Error compiling: Failed to run optimizer! HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from basicv2.