flyingfisch / back2basic Goto Github PK
View Code? Open in Web Editor NEWa library for LuaZM
a library for LuaZM
1. What it is Back2BASIC is a library that allows you to have all the functions you loved in BASIC. This will help BASIC programmers switch to lua, as well as making it more straightforward to port BASIC programs to lua. 2. Already implemented - b2b.menu (a prefabricated menu function) - b2b.printText (like "HELLO" in BASIC, but with LESS-style page breaks) - b2b.locate (like locate in BASIC) - b2b.ygraph (Y= graph) - b2b.inputString (get user input) 3. To be implemented 4. Usage Make a folder called "lib" in your root directory. Put b2b.lua in this folder. In the program you wish to use the library, put run([[lib\b2b.lua]]) at the top. 5. Function syntax NOTE: all width, height, x, and y values are not pixels, but characters. b2b.autoFastCopy(option) Set whether b2b commands should auto refresh the screen on completion. - option: 1 or 0. 1 means it will automatically refresh the display, 0 means its will not. b2b.menu(x, y, width, height, title, array, colorfg (optional), colorbg (optional)) a menu function. returns number of selected item. - x: integer - y: integer - width: integer - height: integer. if smaller than number of items, menu will automatically scroll. - title: string. title to be displayed above menu. - array: array. menu options. ex. {"entry1", "entry2"} - colorfg, colorbg: color. defaults to b&w b2b.printText(string, colorfg (optional), colorbg (optional)) displays text with LESS-style page breaks - string: string to be printed - colorfg, colorbg: color. defaults to b&w b2b.locate(x, y, string, colorfg (optional), colorbg (optional)) like the Locate command in BASIC. - x: integer - y: integer - string: string to be displayed - colorfg, colorbg: color. defaults to b&w b2b.ygraph(f, vwin (optional), type (optional), colorfg (optional), colorbg (optional)) Graphs a Y= graph. - f: function of x to display. ex. function (x) return math.sin(x) end - vwin: array. ex. {xmin=-6, xmax=6, ymin=-3, ymax=3, step=.1} - colorfg, colorbg: color. defaults to b&w b2b.inputString(prompt, colorfg (optional), colorbg (optional), blinkspeed (optional)) Returns user input. - prompt: string. Is displayed above the input block. - colorfg, colorbg: color. defaults to b&w - blinkspeed: integer. speed cursor should blink at. defaults to 60. b2b.fline(x1, y1, x2, y2, color (optional)) - x1 y1 x2 y2: integer. measurement in pixels. - color: color. defaults to b&w
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.