It is currently Mon Mar 27, 2017 11:11 pm



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: ezBAS! program editor
Unread postPosted: Thu May 19, 2016 12:52 pm 
Offline

Joined: Wed May 04, 2016 6:09 pm
Posts: 71
Attachment:
2016-05-19 19.31.07.png
2016-05-19 19.31.07.png [ 86.17 KiB | Viewed 906 times ]
Attachment:
2016-05-19 19.31.53.png
2016-05-19 19.31.53.png [ 55.56 KiB | Viewed 906 times ]
This is a simple .BAS file editor I made so that I can make quick tweaks
by breaking down my files by functions and gosub/goto sections

http://laughton.com/basic/programs/tool ... %20Editor/

It has some limitations:
1) I haven't figured out how to do the program chaining so when you ###RUN a program it doesn't come back to ezBAS
2) it's a bit slow and a memory hog
3) not 100% sure the htmledit$() function is perfect... at any rate it can't edit itself :oops:
4) the ###UNUSED function finder will generate a false positive if a function is needed in the INCLUDE files but declared in the main source file
5) there is no format or search and replace, however you can ###TAG functions that contain a search string


I haven't done anything too fancy I hope but please be careful before you trust it with your most precious .BAS files

I haven't made it into an apk yet so we will see how that goes too.


Attachments:
2016-05-19 19.31.07.png
2016-05-19 19.31.07.png [ 86.17 KiB | Viewed 906 times ]
Top
 Profile  
 
 Post subject: Re: ezBAS! program editor
Unread postPosted: Thu May 19, 2016 1:09 pm 
Offline
User avatar

Joined: Tue Jan 03, 2012 9:31 am
Posts: 5452
Location: Paris, France
Wow it looks great!
It looks like an analyzer, but why do you say to be careful with our programs? Does ezBAS alter the programs it analyzes?

_________________
- Creator of the Android BASIC! Compiler


Top
 Profile  
 
 Post subject: Re: ezBAS! program editor
Unread postPosted: Thu May 19, 2016 2:31 pm 
Offline

Joined: Wed May 04, 2016 6:09 pm
Posts: 71
Yes.... You can edit each block of code with the simple text editor.. It patches everything back together.. It will only change the original if you
overwrite with a save to the same (default) filename.. The text editor is just an html text input box, but it's nice that the copy and paste functions seem to work well and it's more responsive than TEXT.INPUT

I think the only bad thing I think it might do right now is insert extra lines between the blocks of code(probably because of the JOIN), though I am not sure this is still a problem.
The parse() function does the major work of splitting everything up and storing it in a list.


Last edited by cterp2 on Thu May 19, 2016 2:47 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: ezBAS! program editor
Unread postPosted: Thu May 19, 2016 2:33 pm 
Offline

Joined: Wed May 04, 2016 6:09 pm
Posts: 71
Not really sure how I can get RUN to work with the QuickAPK version... can't seem to get the directories straight..


Top
 Profile  
 
 Post subject: Re: ezBAS! program editor
Unread postPosted: Thu May 19, 2016 5:20 pm 
Offline

Joined: Wed May 04, 2016 6:09 pm
Posts: 71
Oh well... guess it can't because of security issues....HOWEVER... it runs fine if I use a BASIC! shortcut widget on my phone YAY!

I just disable ###RUN if it's an APK



oops.... forgot to test program for new users... it crashed if the default source file was renamed or deleted... should be ok now


Top
 Profile  
 
 Post subject: Re: ezBAS! program editor
Unread postPosted: Thu May 19, 2016 7:24 pm 
Offline

Joined: Wed May 04, 2016 6:09 pm
Posts: 71
It was creating a lot of blank lines between sections.. I trim them out now.


Top
 Profile  
 
 Post subject: Re: ezBAS! program editor
Unread postPosted: Sat May 21, 2016 7:08 pm 
Offline

Joined: Wed Apr 15, 2015 3:57 am
Posts: 409
added colored tagging of functions and a simple search and replace...
So far the biggest problem I seem to have with it is that I sometimes accidentally paste code
from the clipboard.. but then again, that seems to happen with all the other editors too.

I might change it so that it will group goto tags with functions just under the function and not create separated sections.

I also want to make it so that I can really easily copy and paste functions for reuse in other programs.


Attachments:
2016-05-22 01.50.03.png
2016-05-22 01.50.03.png [ 85.29 KiB | Viewed 749 times ]
Top
 Profile  
 
 Post subject: Re: ezBAS! program editor
Unread postPosted: Sat May 21, 2016 10:57 pm 
Offline
User avatar

Joined: Tue Jan 03, 2012 9:31 am
Posts: 5452
Location: Paris, France
What is the color code for?

_________________
- Creator of the Android BASIC! Compiler


Top
 Profile  
 
 Post subject: Re: ezBAS! program editor
Unread postPosted: Sun May 22, 2016 12:04 am 
Offline
User avatar

Joined: Sat Oct 04, 2014 5:45 am
Posts: 614
Cterp wrote:
Oh well... guess it can't because of security issues....HOWEVER... it runs fine if I use a BASIC! shortcut widget on my phone YAY!

Some time ago I did some experimenting and had in mind to make a RfoDesigner for Android.
Someone then told me about a snake that eats its own tail.
But attached an example of what I think you are pointing at if it could be of use?
It is not a complete app but working and was only put together now for your use.
-Tap New Button.
-New blank design screen presented.
-Touch/drag rectangle to place New Button.
-Lift finger draws new button.
-Back key returns to Menu screen.
-Run the new Bas file that was created
-The new bas file is opened in itself.
-Touch screen and it returns to the menu screen. :)
-Basic! did not run it.

I am sure you will be able to get to the code inside the apk.

ImageImageImageImage


Attachments:
Noname.apk [435.4 KiB]
Downloaded 27 times

_________________
Download and tutorial for RFODESIGNER
https://sites.google.com/site/rfodesigner/
Top
 Profile  
 
 Post subject: Re: ezBAS! program editor
Unread postPosted: Sun May 22, 2016 2:59 pm 
Offline

Joined: Wed May 04, 2016 6:09 pm
Posts: 71
D'oh! Unfortunately my htmledit$() can't be used to edit Unicode characters so I went back to using TEXT.INPUT which actually works
pretty well for most things.


Version 0.2 should be on the ftp site:
I added some new commands:

###CHECK - check program for orphans and dangling ENDIFs (still not perfect, yet useful)
###OPTIMIZE - generate minimized version with very short function names, whitespace trimmed, comments removed, INCLUDES merged.
###COPY - copy series of entire blocks/functions to the clipboard: extremely handy for reusing old functions and code!

I also changed the screen background to white: dark theme was much too hard to read in bright sunlight. I will post screenshots once my phone finished charging.

=================================================



Nicholas- The color code is for the ###TAG function... it does a case insensitive search and highlights any code blocks that have that string...
quick way of seeing which functions call subfuncions

RSA- That looks pretty cool... I will probably try wrapping it in an apk like you did once I am sure things are working well enough. For now it's not a problem at all for me to run it using a BASIC! Launch widget but it will be nice if it could be a standalone app.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
suspicion-preferred