How to start?

Forums: 

Hello. I am new in the forum.
A greeting for all.
I like what I have read on SmallBasic. I have downloaded the application both in Android and in Windows 10. In both cases I do not find the way of beginning to write code. I do not see an IDE or similar.

Can someone indicate me how to initiate the program of suitable form?

Thanks.

Ngr777

Welcome to SmallBASIC forum.

Yes, SmallBASIC is a little tricky. The editor is in the Right mouse click menu. No IDE, or sort of an IDE?

You could start in Windows 10 with a Notepad editor and make this:

print "Hello World"
pause

save as hello.bas
then click on that file from SmallBASIC navigator (which looks only for .bas files)

I call first screen from sbasicg.exe the navigator because you change directories and pickup your bas files from there.

Are you still around, I might talk you through?

I have a .bas file for starting new programs, just click that and start editing it. You right click mouse to start and stop program as well as copy/paste and a host of other things. (I start allot of bas files from copies of old and rename them but you need one old one to start with.)

There are 3 toggle modes in right click mouse menu Editor ON, Run On, and Editor Live (I don't know last one)
With Run toggled, you click a bas file, it runs it and you never see editor.
In editor mode, you click a bas file and you find the file code contents. I leave my SB on that setting because you can run directly from editor mode.

(Clicking bas files to run or edit, assumes you have registered SmallBASIC to run bas extension files when they are clicked in Windows. Otherwise, you have to run sbasicg.exe from task bar or desktop shortcut.)

Thank you for the response.
Without these few instructions it had not been capable of beginning.
I understand your way of organizing. Really I have executed some program of example, but on having finished could not see the code.
I will do, as you indicate me, to write the filexxx.bas with an external editor and then save it in the directory reserved for SB. I think that I will fix them up.
The last question is in using the virtual keyboard of the mobile Android, without mouse to do right click.
Thank you very much for his help. Have a good day.
Ngr777.

Yes!!!

In the mobile, touch on the three vertical points...

It would be good to display a concise and useful help message at start-up time. This could be somewhat based on your above reply. We could also include some simple graphics to help make the appearance a bit less austere. Any suggestions?

Btw, the when "Live mode" is enabled, a running program will re-start when the file time stamp changes. If your program is blocking waiting for the mouse or keyboard, you need to nudge the mouse to cause the re-start. The idea is to type your program and see the effect immediately.

Help is standard menu item:
* Getting started
* Help from within editor ctrl + h and F1 (use esc to get back into main editor section)
* On-line resources (this forum link)

I don't think you want to load sbasicg.exe with a text file, so offer a Getting Started supplemental file with download of sbasicg.exe or here at this site right after Welcome description of SB or ... ?

BTW the file menu item (files listing) doesn't always jive with the Directory/Folder in "Navigator" main screen. I was testing NEW under File (Windows 10).

But for a short message between Welcomes in different color:

Pop up menus are accessed by either a Right mouse click or 3 vertical dots tap (Android)
From popup menus, you can do things like toggle the Editor, Run, Adjust Font size...

Is Ctrl + e taken? (To just turn the editor on without togging, from a keyboard key combo)
(Personally I wouldn't mind the editor always being on when running sbasicg.exe directly.)

Getting Started: Hello World example
0. From sbasicg.exe main "navigator" window
1. Click Menu File and get into File screen
2. clear first line (backspace or delete) then type Hello and click New, this should appear in files listing now
3. click << to get back to main navigator window where Hello.bas should now also appear
4. Click that file to edit (if editor is toggled on)
5. under the two REM comments type
print "Hello world"
pause
6. right click mouse or tap 3 dot verticals
7. select Run from popup
8. see hello world
9. right click mouse or tap 3 or use backspace key, select back
10. should be back to navigator window
11. back again and will exit SmallBASIC

You will soon be in habit of right clicking mouse for menus as much as left clicking it for pointing!

It looks as you have found your way with Android?

If your SB gets jammed so that editor never comes on we can try something with settings file but only as last resort.

Oh also, SB has a FILE menu item now that I forgot to mention.
(I am still figuring out how it works.) Apparently the edit line is just below first (menu) line. To start a new file, type in a new name for file (.bas not needed) and click New. That will get a file started for editing.