Git Product home page Git Product logo

Comments (11)

EgonOlsen71 avatar EgonOlsen71 commented on August 11, 2024

You can use Π in text sources.

from basicv2.

viteisele avatar viteisele commented on August 11, 2024

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.

EgonOlsen71 avatar EgonOlsen71 commented on August 11, 2024

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.

EgonOlsen71 avatar EgonOlsen71 commented on August 11, 2024

Should be fixed now.

from basicv2.

viteisele avatar viteisele commented on August 11, 2024

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.

EgonOlsen71 avatar EgonOlsen71 commented on August 11, 2024

I'll have a look. That should actually happen inside strings only...

from basicv2.

EgonOlsen71 avatar EgonOlsen71 commented on August 11, 2024

I can't reproduce this. Can you give me an example, please?

from basicv2.

viteisele avatar viteisele commented on August 11, 2024

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.

EgonOlsen71 avatar EgonOlsen71 commented on August 11, 2024

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.

EgonOlsen71 avatar EgonOlsen71 commented on August 11, 2024

Should behave better now...

from basicv2.

viteisele avatar viteisele commented on August 11, 2024

Yes, now compiler and console have the same correct behavior :-)

from basicv2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.