Caefix ubasic changes (was Re: Improving CHDK ND filter support) - General Discussion and Assistance - CHDK Forum

Caefix ubasic changes (was Re: Improving CHDK ND filter support)

  • 3 Replies
  • 214 Views
*

Offline Caefix

  • **
  • 54
  • Sorry, busy deleting test shots...
Advertisements
 8) Searching Ixus230  [] [] [] [] _ _ _ _
Could You recompile it with ... ,please?
((((((((((((((((((((((((((((((((((((((((((((((( :lol
All lifetime is a loan from eternity.

*

Offline reyalp

  • ******
  • 12159
Re: Caefix ubasic changes (was Re: Improving CHDK ND filter support)
« Reply #1 on: 26 / August / 2019, 16:40:13 »
I split this into a separate topic since it's not really connected to the ND changes.

If you want to propose changes, it would be good to have an overview. I understand language may make that difficult. You can post in German and let us google translate if that works better for you.

In general, I don't see much reason to add advanced features to ubasic, people who want a sophisticated programming language can use use Lua.

I would also be hesitant to change things like case sensitivity, whatever the merits it has been the way it is for a long time.
Don't forget what the H stands for.

Re: Caefix ubasic changes (was Re: Improving CHDK ND filter support)
« Reply #2 on: 27 / August / 2019, 01:50:48 »
I understand language may make that difficult. You can post in German and let us google translate if that works better for you

I haven’t understood his posts in the German forum. The Google translator will not change that either ...
http://forum.chdk-treff.de/viewtopic.php?f=7&t=3626&sid=6c5ed7fd4a7df882618bd18dd39357a4
M100 100a, M3 101a, 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), 2*S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Offline Caefix

  • **
  • 54
  • Sorry, busy deleting test shots...
Re: Caefix ubasic changes (was Re: Improving CHDK ND filter support)
« Reply #3 on: 28 / August / 2019, 14:16:50 »
Dr.Googles intelligence simulators fail here? That´s nice...


I feel zero need to convince anybody, existing & working scripts can do that.
At the moment it´s a trophy for dungeonproof textadventurers, relaxing from braindessert...

I like Lua too.
Scriptix.Lua tells me all days:
"Error in Errormanagement".
Seems to be a warning to the human race.
So I conserved this urgent statement.

"Next level Ubasic" is 99-300+% backward compatible.
My cams understand it already, so a user update should be the minor work,
because of great basic scripting & dokumentation already done by experts over several years in several languages.

The only need to touch a few old scripts You can detect with a singleline !is_key.bat
if %~x1?==? (cmd /T:4E/Kdir/b/s/on %1) else (cmd /T:1F/K type %0 %*|find /N "is_key"|find /V "if is_key")
An is_key K "menu" block needs now a K=0 at the top to run as usual,
(it got similar to a 'select K'). That´s all about the -1%.

100%*funfactor because it runs quite smooth and stable under some worst case conditions that old Ubasic would never reach or survive.
auto+Aiaf+md_detect...
focus loupe is critical!
...I´m contented with the mountainracebike version.

To speed up long scripts even more
 You should write a 'gosub "bottom"' below the @header to set settings there.
 That speeds up all loops and jumps, in long old Ubasic scripts You might recognize that even more.
 Now You can prefix variables with a '#', so parser avoids analyzing keywordlist+...
 
Tokenizer.h is the keywordlist. Most of the news are selfexplanating.
Tokenizer.c is the parser, tells a lot too.
Ubasic.c + demo scripts & (ubasic.flt=28.148 Bytes) do most of the rest.

I found no way around reading the sources several times...
but <10% are important for basic scriping above today´s manual.
You can detect them with a singleline !statem.bat
if %~x1?==? (cmd /T:4E/Kdir/b/ad/s/on %1) else (cmd /T:1F/K type %0 %*|find /N "statement")

Cam´s reader & editor are missing highlighting so some Users may find it usefull to write their most liked IF
or some central keywords upcase for orientation.


It got a bit spiced with some Lua & C syntax.
If get_shooting() && (i=2 || k==3 ) Then c++ else d*=11 will work too.
Other nasty and avoidable mistakes, eaten by parser:
  if ... then shoot else exit_alt


Btw. All my cams survived Ubasic dungeon. No Bricks.
&& It´s not necessary to enter it, but fun.

My first look happened at the anniversary of Fukushima.
Accidently, thank´s a singleline !listiX.bat
All I know and knew and forgot about `C´ I learned from the three Ubasic files.

Experienced readers will miss some bugs, might become boring...

All lifetime is a loan from eternity.