After some searching in the code, I found that the "in" operator does what I want, e.g. if not ('d' in a) then print "no such key" Unfortunately this use of "in" is not documented, but as far as code changes, the issue can be closed.
No way to check if a map already contains a key
Spelling: stoped vs stopped
Enable compiling on windows without MinGW
QT issue - scaling problems on high dpi displays
Added to 2.0.99.10 (960) and committed
Jim, I still get the console window when compiling from latest source (on Windows). I believe this is what controls this, in BASIC256.pro on line 19: CONFIG += console
Debugging does not work with references
Updated to source 2.0.99.9 (959)
the most annoying bug - not solved
Copying your code and adding the "print msec" statement on my PC with 2.0.99.7 with qt 5.15.10 gave me 16886, 16907, and 16873 for three runs from a fresh load of the program. I believe this has been fixed.
Problem 1 was fixed a long time ago. In the source 2.0.99.x.
You can always download the most current code using an "svn" tool. At the LINUX command prompt the source code can be downloaded with: svn checkout svn://svn.code.sf.net/p/kidbasic/code/trunk kidbasic-code
segfault with dim() in debug mode (snap/linux)
Updated and committed to main # 958. Thanks for the diff.
shorthand for comments/remarks
Hi Mike, I know it's been a while since you opened the issue, but if you see this message, and if you have an example for your problem #2, a short code which demonstrates it, please respond here. Problem #1 is a simple configuration issue which should get fixed soon.
Sure, I just want to share the fixes with others.
I have not done anything with it for a while. I will review your posts in the next few days. would you be willing to become a contractor here?
I have submitted bug fixes for some issues which are fairly important - like debugging not working for any code which includes arrays or references - but it doesn't look like there is any activity. I have my own version with the fixes which I use for teaching, and which I would like to share with others. If the project is inactive, I will consider making a fork, probably on Github, and contribute bug fixes and enhancements.
QT issue - scaling problems on high dpi displays
Debugging does not work with references
I made a fix for this - it's a race condition which requires a check that a variable has been initialized before adding it to the watch window. This is the patch: Index: VariableWin.cpp =================================================================== --- VariableWin.cpp (revision 957) +++ VariableWin.cpp (working copy) @@ -218,7 +218,7 @@ for(int y = 0; y<v->data->arr->ydim;y++) { DataElement *q = v->data->arrayGetData(x,y); DataElement::getError(true); - if (q->type!=T_UNASSIGNED) { + if (q &&...
https://sourceforge.net/projects/micro-a-interpreter/
280 downloads ...very good as abandoned project ..project in development very similar in syntax is micro(A). https://sourceforge.net/projects/micro-a-interpreter/
how they old..old ..? just 3 year back 2020 ???
old old questions are these :)
community forum is on : http://basic4us.epizy.com/forum/index.php
You can try and modify over 100 examples very easy.
BASIC is not Pythopn or PHP what kind of bad questions are this ?
Project very similar in syntax and in development micro(A) https://sourceforge.net/projects/micro-a-interpreter/
ok, first try to do it myself :) works only with monospace font and is for the graphics window: subroutine locate(x,y,textx,texty,a$) font "courier",5,30 text x+1+textxtextwidth(a$)/length(a$),y+textytextheight,a$ end subroutine
ok, first try to do it myself :) works only with monospace font: subroutine locate(x,y,textx,texty,a$) font "courier",5,30 text x+1+textxtextwidth(a$)/length(a$),y+textytextheight,a$ end subroutine
Hey there, some guy requested a "locate" command to position the cursor within the textwindow. I want to support that and to add a few other things. I think we both have the same idea of making the text window more useful and be able to play around with it (like on the C64 in the old days). - a "locate" command to set the cursor to postition - commands for cursor up, down, left and right - a "home" command to bring the cursor back to top left without clearing the window. - a command to define the...
define textwindow and additional cursor-commands
Hey there, some guy requested a "locate" command to position the cursor within the textwindow. I want to support that and to add a few other things. I think we both have the same idea of making the text window more useful and be able to play around with it (like on the C64 in the old days). - a "locate" command to set the cursor to postition - commands for cursor up, down, left and right - a "home" command to bring the cursor back to top left without clearing the window. - a command to define the...
Hi, I have one more question. BASIC-256 can't generate EXE file. How can ordinary users distribute their programs written in BASIC-256? I guess that most users are: send their kbs files to their friends and ask their friends to download BASIC-256 installation files from the official website and then install BASIC-256 first. write the codes of their programs in their posts on Internet discussion forums, blogs, etc. Visitors copy and paste the codes into the BASIC-256 editors to run. Right? Does the...
I would love to see some of the things you have done. Hello...I am just an amateur and learn programming at my leisure time. Ha....if I am able to finish making a fun program with BASIC-256, I will let you and Richard M. know. Sure! If you would like to be part of the marketing/development team, Thanks for the invitation! I only have limited knowledge of programming. I believe that I am not competent in the development team or the marketing team of a professional software(BASIC-256). I opened this...
I would love to see some of the things you have done. If you would like to be part of the marketing/development team, let me know and we can discuss. J.
No, sorry. Your idea is great, but I do not have the time right now to consider implementing something like that. I am a professor at a small US university and the demands are overwhelming. I would love to see a community get started and grow. I will take leadership and if you are willing to get it rolling, I will support and maintain the code as needed. Additionally, I would love to get some additional coders into the source, if you know any.
As far as development team – it is really just one individual who I think is quite busy. I have done a few small changes, Hello, there are two members in the development team. I see! However, I don’t think anyone would mind you promoting BASIC-256 as it is really quite great. If I have some interesting finished programs written in BASIC-256, I will upload to my account on Itch. Sure. I will also mention BASIC-256 there. Of course I will not upload low-quality finished programs to Itch. No doubt....
Your idea is great. As far as development team – it is really just one individual who I think is quite busy. I have done a few small changes, but can’t speak for the project as a whole. However, I don’t think anyone would mind you promoting BASIC-256 as it is really quite great. Cheers, Richard. From: discussion@kidbasic.p.re.sourceforge.net on behalf of rickywk rickywk@users.sourceforge.net Reply-To: "[kidbasic:discussion]" 617729@discussion.kidbasic.p.re.sourceforge.net Date: Saturday, 22 April...
Wow, I am very surprised. No feedback, no reponse from the development team or any other BASIC-256 user after 7 days. Is my idea too bad?
Hello! First, I want to say that BASIC-256 is a very good freeware. I downloaded BASIC-256 about 1 month ago. In addition, I also downloaded the pdf book(first edition). I am reading the book and learning the language. Enough nice examples are in each chapter of the pdf book . Good book! Sure. Though I am not a child or a student, learning BASIC-256 is so enjoyable. I have a little suggestion. Since the target audience of BASIC-256 may be the 10 to 20 age group, BASIC-256 should be put in some places...
Hello! First, I want to say that BASIC-256 is a very good freeware. I downloaded BASIC-256 about 1 month ago. In addition, I also downloaded the pdf book(first edition). I am reading the book and learning the language. Enough nice examples are in each chapter of the pdf book . Good book! Sure. Though I am not a child or a student, learning BASIC-256 is so enjoyable. I have a little suggestion. Since the target audience of BASIC-256 may be the 10 to 20 age group, BASIC-256 should be put in some places...
Richard, I've only just started using the language and was using an older version of the book. I will be sure to read the updated version - thanks!
Richard, I've only just started using the language and didn't know about the include statement - thanks!
Basic-256 has the 'include' statement so that you can create libraries of subroutines. Chapter 10 of 'So You Want To Learn to Program' has explanation and sample.
Hi Jim, I appreciate that Basic256 isn't designed for large programs, but something which supports modularity would be very welcome. It doesn't have to be sophisticated, just the ability to load previously written subroutines into the current program would be good enough. Anyway, thanks for all your work on Basic256, it's awesome.
print "This output is okay!" dim x(100) # segfault, when I reach this point and klick Step >| print "This is printed when I run the code, but not when I step across in debug mode."
Can you upload a simple demo program that causes the fault. It will make it easier to reproduce.
segfault with dim() in debug mode (snap/linux)
I believe that your OS (the CHAR function) is converting characters 128 and higher to Unicode or your system's character encoding. ASCII only goes to 127. James M. Reneau Ph.D. - President RENEJM Enterprises, Inc. P.O.Box 278 Russell, KY 41169-0278 1-606-923-4421 (text and voice) Sent from Proton Mail mobile -------- Original Message -------- On Jun 13, 2022, 5:33 PM, Arno Brijoux wrote: Hi Richard, hi Jim, thank you very much for your help. The procedure works good. I am happy! But can you tell...
Hi Richard, hi Jim, thank you very much for your help. The procedure works good. I am happy! But can you tell me, why my procedure will not work? I cannot find any error in my code. Best regards Arno
the writebyte function tales two arguments. the file number and a single integer to output. it should do the trick for you. James M. Reneau Ph.D. - President RENEJM Enterprises, Inc. P.O.Box 278 Russell, KY 41169-0278 1-606-923-4421 (text and voice) Sent from Proton Mail mobile -------- Original Message -------- On Jun 12, 2022, 8:20 PM, Richard Murphy wrote: Also for testing you can write output to file and then open with a Hex editor (VS Code or Notepad++ have plugins for hex or many free programs)...
Also for testing you can write output to file and then open with a Hex editor (VS Code or Notepad++ have plugins for hex or many free programs) to make sure it is what you want. fnr_Lenz = 1 open fnr_lenz, "byte.out" tx = {255 , 254, 33, 128, 161} Print "Hex value: "; for byte = 0 to tx[?]-1 print tohex(tx[byte]) + " "; writebyte (fnr_Lenz, tx[byte]) next byte print close fnr_Lenz
Have you tried just keeping it in numeric format instead of converting back and forth to string? Something like: tx = {255 , 254, 33, 128, 161} Print "Hex value: "; for byte = 0 to tx[?]-1 print tohex(tx[byte]) + " "; writebyte (fnr_Lenz, tx[byte]) next byte print
Hi Jim, thank you for your interest. Enclosed you find the program (2 parts). If I force an answer from the interface by hand, then the programs gets the correct answer. This shows for me, that the hardware an the parameters are o.k. Best regards Arno
Thanks. I was thinking of adding ‘elseif’ to the language. Seems BASIC-256 CASE is equivalent to if-elseif-else, but elseif is more widely used in other languages with case being more often the select/switch-case structure. Thoughts? Cheers, Richard. From: discussion@kidbasic.p.re.sourceforge.net on behalf of Jim Reneau renejm@users.sourceforge.net Reply-To: "[kidbasic:discussion]" 617729@discussion.kidbasic.p.re.sourceforge.net Date: Saturday, 11 June 2022 at 8:41 AM To: "[kidbasic:discussion]"...
Should be committed to SVN
Can you post a sample of your code. It looks like your output is being converted from bytes to another character encoding.
Hello, I try to control my model-railway by a basic256-program. The connection is via RS232. After openserial I have to write 5 bytes (ff,fe,21,,80,a1) to the interface. The control print is o.k. but the bytes send to the interface differ: ff is changed in c3bf, fe in c3be, 21 is not changed, 80 is changed to c280 and a1 in c2a1. Some tests shows, that bytes less than 128 are o.k. and bytes >127 are changed. Can anybody help? Many thanks in advance. Arno Brijoux
When get a chance if you can add texttospeech to the macx section of BASIC256.pro it will allow successful compilation on OSX (currently High Sierra QT Creator 4.10.1 QT 5.13.1/2). -# Sound - QT Mobility Multimedia AudioOut QT += multimedia QT += texttospeech Thanks, Richard.
Hello, I've enjoyed trying out BASIC-256 today. I was able to get it to install in Ubuntu 20.04 just fine. However there seems to be a typo in the Summary: sudo snap --beta basic256 Should be: sudo snap install --beta basic256 Thanks for your time in developing this really cool software.
Correction Basic256 version is 0.9.6.69 on Ubuntu 16.04 LTS. I downloaded version 2.0.0.11 but the app installs as version 0.9.6.69. How do I install the latest version?
Correction Basic256 version is 0.9.6.69 on Ubuntu 16.04 LTS.
I am running Basic256 version 9.6.69 on Ubuntu. I launch the app from the terminal with command "basic256&". when I try using "penwidth" it acts as a variable and not as a command. I get errors whenever I try to use it as illustrated in the documentation. Please advise. I am a new user to both this software and forum. Thank you.
duplicate
Was thinking it would be nice to have a setable flag (CARTESIAN true/false) that would adjust the graphics window to a cartesian coordinate system with center at 0,0 for mathematical plots similar to gnuplot, MATLAB/Octave, etc. Would make it a bit easier when teaching Math and Programming simultaneously. If desired, I could work on the code to implement this.
Was thinking it would be nice to have a settable flag (CARTESIAN true/false) that would adjust the graphics window to a cartesian coordinate system with 0,0 in center for mathematical plots similar to gnuplot, MATLAB/Octave, etc. Would make it a bit easier when teaching Math and Programming simultaneously. If desired, I could work on the code to implement this.
Was thinking it would be nice to have a setable flag (CARTESIAN true/false) that would adjust the graphics window to a cartesian coordinate system for mathematical plots similar to gnuplot, MATLAB/Octave, etc. Would make it a bit easier when teaching Math and Programming simultaneously. If desired, I could work on the code to implement this.
Was thinking it would be nice to have a settable flag (CARTESIAN true/false) that would adjust the graphics window to a cartesian coordinate system for mathematical plots similar to gnuplot, MATLAB/Octave, etc. Would make it a bit easier when teaching Math and Programming simultaneously. If desired, I could work on the code to implement this.
location not complete - moving to another dev machine
Update for 2.0.0.11
Update for 2.0.0.11
Hello Jim: Where can we get version 2.0.99.x? The linkin sourceforge downloads 2.0.0.11 Thanks
rewrite the wat BasicOutput handles cursors. This is a start to adding text location to the language.
LOCATE command in BASIC256
The newest Windows download is 2.0.99.x and on my machine the release version does not display the extra black window. This is an artifact of the QT development environment and holds the process that is running the UI. The modal nature of the prompt, confirm, and other dialogs is intentional. The model prompt has to block execution of the run-controller by setting a mutex until it completes. Processing stop is also pended until that mutex is released. That is the nature of the way it was originally...
troublesome problems...
A really nice programming language ! I made a little math quiz in BASIC256 for my son. The problems are both printed and spoken via the "say" command. Then the user is prompted for an answer via the "input" instruction. The problem is that the speech needs a bit longer and if you try to type the answer too early (before finishing the speaking and executing the "input" instruction) the key strokes are neglected. Thus I would like to have an asynchronous "say" instruction like it is yet possible with...
2.0.99.5 - added option for line wrapping on view menu in the editor and text output widgets
2.0.99.4
Hi Jim, thank you for your quick answer. Perhaps it is possible to give the "spriteplace"- or the "spriteshow"-statement an additional parameter: z-layer (0-255?). Then existing programs will have no troubles. Thanks for your help Arno