Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jul 5, 2016 16:57:11 GMT -6
I download rcbasic, onto mt 64 bit Linux machine, and the demos ran flawlessly.
I read the challenges in "Introduction to programming" and figured I would try that.
I entered coding into the Editor, clicked 'Run' arrow, nothing. No output. No error(s).
cls num$ = Input$("Give me a number I can count to: ") num = val(num$) print num
Obviously it's not finished but I figured I would test it before continuing. Did I do something wrong or could there be an editor bug?
J
|
|
|
Post by n00b on Jul 5, 2016 17:09:44 GMT -6
I will test it out real quick and see. If its a bug in the editor it shouldn't be to hard to fix.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jul 5, 2016 17:17:23 GMT -6
I ran rcbasic from the terminal and noticed that the program did as it was told. The output went to the console. It is obvious that the bug is not the editor but my use or lack of use of the correct commands. Time to examine the instructions more closely.
J
|
|
|
Post by n00b on Jul 5, 2016 17:18:30 GMT -6
I ran it in linux mint 64 bit and it ran just fine. However, you need to put a parenthesis on cls otherwise it will give you an error. Rcbasic is not as forgiving on that as sdlbasic is.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jul 5, 2016 17:25:54 GMT -6
Many thanks. Will do...
J
|
|
|
Post by n00b on Jul 5, 2016 17:38:30 GMT -6
I should also note that in RCBasic cls() is only used to clear the window surface in a graphics window. It should really only be used to clear PrintS and InputS statements.
Also once you create num$ as a string it is a string for the duration of the program. So the line num = val(num$) is only converting the string num$ to a number and then converting it back to a string to store in num. RCBasic is alot more strict on types in general than sdlBasic but it isn't too hard to get use to I don't think. I use strict types when I am using sdlBasic also so because that is just how I learned to program.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jul 5, 2016 17:44:28 GMT -6
I think there may still be a linkage problem.
I run a simple ... print "This is a test" and the console issues a message: sh: 1: ./rbc: not found
J
|
|
|
Post by n00b on Jul 5, 2016 18:02:55 GMT -6
I think I know what is causing that problem. When you run rcbasic.sh, make sure you are running it from the directory it is in. If you run it from another directory it will try to look for the compiler and runtime in the directory your terminal is currently in. It is not really a bug in the editor so much as it is a flaw in the bash script. I suck at bash scripting so there is probably a better way of writing it than what I did.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jul 5, 2016 18:50:07 GMT -6
I figured you might say that... I created a bash script that is launched from the desktop and I have run it from its directory. The difference is: Running from the launcher displays the GUI as it should, but if there is an error of some kind, I cannot see it. Running from console displays both GUI and rcbasic messages. I have been running rcbasic directly from it's directory for some time now (checking messages)
windowOpen(0,"Test Window",0,0,640,480,0) prints("This is a test")
while key(k_space) = 0 wend
Just ran this code from the launcher and the directory. Both times it ran without error. I seriously think the problem is me. I may be rushing things a little and trying to accomplish too much too soon. Time to slow down and 'hit the books'. Is there a PDF file of the reference manual?
J
|
|
|
Post by n00b on Jul 5, 2016 19:17:39 GMT -6
Unfortunately no. I wanted to make the reference manual easy to navigate like the sdlBasic manual so I took a similiar approach of using HTML frames for the manual. The manual is also a work in progress as I do eventually plan on adding more examples on when and how to use different functions. The best place to start is probably just looking at the examples. The shadow of the beast example is a line by line conversion of the sdlBasic version so you can draw similarities between them. Also check out some of the videos I did on RCBasic by going to the videos section on the website. I will write some more tutorials for the tutorial section on the forum if that will help. I have been meaning write some more for a while but I have been spending most of my time working on rcbasic itself. I will get up another tutorial tonight. In the mean time feel free to post any questions. RCBasic is very similar to sdlBasic but also has a lot of differences that can be overwhelming.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 23, 2016 5:35:33 GMT -6
I tried rcbasic in my linux(xubuntu 16.04 64bit) , when i press "run" button i take error on terminal. execvp(/usr/bin/rcbasic_compile, ) failed with error 2!
|
|
|
Post by n00b on Aug 23, 2016 8:15:02 GMT -6
I have never tested in xubuntu so it could just ne a library i didn't include. I will try to run it from a live cd to see what it is.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 23, 2016 10:59:14 GMT -6
sudo apt-get install libgtk2.0-0:i386 , this command will help you to run rcbasic. (I found it on net)
|
|
|
Post by n00b on Aug 23, 2016 19:18:37 GMT -6
Thanks, I will try to get rcbasic stable on more linux distros. Linux support is tricky because I dont know which libraries are included on which linux distros. I bundled the SDL libs to insure it would run out of the box on ubuntu and mint but never tested it on any other distro. Eventually I want to provide an actual Debian package but they are not as easy to make as you would think.
|
|