fig 4.2: (backwards compatibly) supports british and aussie spelling

t "hello" colortext 5 print

t "hello" colourtext 5 print

# both lines work; both are supported in help system

download on figs support forum: http://unofficialdistros.freeforums.org/fig-4-2-colortext-and-colourtext-both-valid-commands-t95.html

 

Advertisements

18 thoughts on “fig 4.2: (backwards compatibly) supports british and aussie spelling

    1. thats cool. i dont like that one as much– it tries to handle the string conversion for people, but the string conversion is HATEFUL in 3.1. hateful.

      i dont know any other language that does it exactly that like. i think its fine that theres a choice. when the python foundation drops support for python 2, i will probably switch to pypy. it works, ive tried it. but i cant get pygame working with pypy. some people have.

      i tried out fig 3.1 for 6 months to a year, and it worked most of the time.

      and i finally got so fed up with the side effects and unexpected issues, that for fig 4.x i switched right back to python 2. OF COURSE you may fork fig 3.x at any time, youre always welcome to make it your own. i may even support 3.x at some point, but right now i have low hopes for it.

      you can do anything you want using inline python– you can even override/change figs print command, by putting def figprint in a section of inline python. i override figpset sometimes, to use asterisks instead. but ive tried every trick to convert to python 3. every trick i could find, including 2to3. it just refuses to do what i want 100% of the time. in fig 3.x it does what i want 95% of the time. thats pretty good, i guess. fig 4.x does what *i want* it to 99% of the time.

      Liked by 1 person

    1. i dont think so:

         151	    stdout.write("\x1b[" + n + ";" + str(30+f) + ";" + str(40+b) + "m")
         169	    stdout.write("\x1b[" + n + ";" + str(30+f) + ";" + str(40+b) + "m")

      let me know and i will find a version of fig 3.1 on the internet archive or something. where did you get fig 3.1?

      Liked by 1 person

    1. its you, sorry; i just copied and pasted from the blog: https://codeinfig.wordpress.com/2016/02/10/fig-3-1-source-code-public-domain/

      then i did this to the file to make certain it was alright:

      cat fig31.txt | cat -n | egrep "151|169" | grep stdout
      
         151	    stdout.write("\x1b[" + n + ";" + str(30+f) + ";" + str(40+b) + "m")
         169	    stdout.write("\x1b[" + n + ";" + str(30+f) + ";" + str(40+b) + "m")

      im happy to post the source somewhere else so you can just download it; but the version on the blog is alright, just so you know.

      Like

    1. in windows: open notepad, save file to arj01.fig, then run this from cmd:

      fig31.py arj01.fig

      then run: arj01.fig.py

      mac and gnu/linux instructions available on request. let me know if it has a problem doing something.

      Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s