ianatha / bababasic Goto Github PK
View Code? Open in Web Editor NEWQuickBASIC 4.5 revival on Android
Home Page: https://play.google.com/store/apps/details?id=io.atha.quickbasic
License: MIT License
QuickBASIC 4.5 revival on Android
Home Page: https://play.google.com/store/apps/details?id=io.atha.quickbasic
License: MIT License
My code:
PRINT "What is your name, adventurer?"
INPUT "> "; name$
PRINT "Greetings, "; name$; "!"
IF name$ = "Byron" THEN
PRINT "Welcome, Byron, the greatest hero of all time!"
ELSE
PRINT "Greetings, "; name$; ". Not the hero I was expecting, but I guess you'll do."
END IF
I get an error about no viable alternative, as shown in the screenshot provided.
The following script, due to addition of an empty line at the end, fails.
10 A = 1
20 PRINT A
The error is:
REM --- OUTPUT START
REM !!! SYNTAX ERROR: Cannot mix linenumber and no-linenumber mode!
REM --- OUTPUT END
This should also ensure that the output buffer is flushed/displayed before all the threads are terminated, without the sleep(250)
workaround.
Original request: https://news.ycombinator.com/item?id=38202703#38206991
The app always displays sample.txt
whenever it starts/restarts.
It should remember the buffer of an unsaved file.
See https://stackoverflow.com/questions/40959903/exclude-testing-device-from-firebase-analytics-logging
Ideally, would also exclude Play Store's testing devices.
Currently, we output the stdout and stderr of the running script into the script editor's buffer, and we prepend "REM", to make it comments.
This was a cute hack to get this rolling quickly, but something nicer needs to happen.
The following code:
10 PRINT 1
20 GOTO 10
causes the UI to freeze completely.
The following code fails silently:
10 REM 29-10-2023
20 DIM A(2)
30 A(0)=6:A(1)=A(0)+11
35 A(2)=A(1)+10
40 FOR I%=1 TO 2
50 PRINT "A(",I%,")=",A(I%)
60 NEXT I%
The output was:
REM --- OUTPUT START
REM --- OUTPUT END
VAL("invalid number")
causes runtime error, but it should return 0.
We should implement the QBasic "NAME" statement, which changes the name of a disk file or directory.
Its syntax is "NAME oldfilename AS newfilename".
The NAME statement is similar to the DOS RENAME command. NAME can move a file from one directory to another but cannot move a directory.
The arguments oldfilename and newfilename are string expressions each of which contains a file or directory name and an optional path. If the path in newfilename is different from the path in oldfilename, the NAME statement changes the pathname as well as renames the file as indicated.
NAME "ACCTS" AS "LEDGER"
In principle, resolving this is very similar to implementing the KILL statement in #96. Specifically, the skeleton for declaring a new QBasic statement is the same, but instead of deleting the file (like KILL does), we must rename it.
The relevant files to change are:
After RunActivity finished running, the messages says "press Enter", but there is no keyboard available.
SLEEP's argument should be in seconds, not milliseconds.
Furthermore, SLEEP should be interruptible by pressing any key.
(Check the behavior of SLEEP 0
)
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.