mougino / basica

An Android editor, UI composer, interpreter and compiler for the Basic language
GNU General Public License v3.0
2 stars 0 forks source link

INSTR (legacy) #3

Open olimaticer opened 7 years ago

olimaticer commented 7 years ago

Hi Nicolas, InStr(sgString, sgToFind [, ngStart]) % REALIZER should be in this manner, because

  1. It is much easier to implement.
  2. In all other commands optional parameters are at the end What is the goal to be consistent or to be legacy? See also WORD$, MID$, Join
  3. The object to work on, should be at first. That is different at the bundle.get commands, unhappily too.
  4. Modifiers should be every time at the end
  5. Every time I use IsIn, I use the wrong order first.

BUT RapidQ Syntax: INSTR([start,] search-string, find-string) VB InStr ([Start,] Zeichenfolge 1, Zeichenfolge 2, [Vergleich]) freebasic INSTR(4, "Das Leben ist ein Hund", ANY "Wasser")

APP.BROADCAST should be deleted, because it does mainly not work. Or am I wrong?

At last but not least a suggestion. Could you give each command a link to a basica(o) example server. When you click, you get exactly the right examples.

Gregor

olimaticer commented 7 years ago

Please see PM, too.

mougino commented 7 years ago

Hi Gregor, what PM? I got nothing on my free.fr mail address.

On the first one, I will disagree with you ;) basica relies on a series of dogma, first one being

the syntax should be as close to other BASIC dialects as possible

I don't care if it gives extra work for me to implement, RapidQ, VB, FreeBasic, and PowerBasic all have the optional start option as the first parameter, so will basica. So I will keep retro-compatibility on INSTR.

That being said your remarks are relevant and that is why there is a refactor of INSTR called IS_IN that takes the start option as the last parameter. It's the same IS_IN you already know from RFO BASIC!

The goal is to be both consistent and legacy. But mainly I really want to make RQ/VB/FB/PB programmers feel at home with basica.

I don't have any example of APP.BROADCAST, I use some APP.START in the BASIC! Compiler but I don't know what the broadcast adds, or if it adds anything. I'll keep this issue open to see if I have to get rid of it later on (before official release of basica).

I had a quick view at your BROADCAST enhancements and I think they are way more valuable than the existing APP.BROADCAST. I may borrow them from you. By the by, do you have a repository with the code of your changes to RFO BASIC! ?

Can you detail or rephrase your last question? I don't understand it:

Could you give each command a link to a basica(o) example server. When you click, you get exactly the right examples.

olimaticer commented 7 years ago

Hi Nicolas,

I have only changed this three files.

The StartIntent file have to be defently overworked, but runs fine.

I publish new files under Github issue #221.

This is undelivered message from my forum outbox:

Hi Nicolas,

It seems to be, that you have good relationships to IBM. [:lol:] basica, GW.bas(ic) [:roll:] If you get in trouble with IBM lawyers, you can rename 'basica' with BASICO like Persico (fr. persicot liquor) a good story like Python (Monty Phython) [;)]

You will fork BASIC!, to get a better Basic how you have it described.

What is your timeline? Will you build your version mainly on BASIC! engine fundamentals?

What is with maintaining BASIC!

What is with a new BASIC! version? A changing to basica is not be done in two months!

What is with a migration like Phyton 2 to Phyton 3? Or are you a friend of a big bang?

Are you able to talk about Marc's future plans in a manner accordance with BASIC!

Best wishes and a happy new year to you and your family

Gregor


Maybe preference counter arrows like Stackoverflow

Gregor


Von: mougino notifications@github.com Gesendet: Freitag, 10. Februar 2017 07:58 An: mougino/basica Cc: olimaticer; Author Betreff: Re: [mougino/basica] INSTR (legacy) (#3)

Hi Gregor, what PM? I got nothing on my free.fr mail address.

On the first one, I will disagree with you ;) basica relies on a series of dogma, first one being

the syntax should be as close to other BASIC dialects as possible

I don't care if it gives extra work for me to implement, RapidQ, VB, FreeBasic, and PowerBasic all have the optional start option as the first parameter, so will basica. So I will keep retro-compatibility on INSTR.

That being said your remarks are relevant and that is why there is a refactor of INSTR called IS_IN that takes the start option as the last parameter. It's the same IS_IN you already know from RFO BASIC!

The goal is to be both consistent and legacy. But mainly I really want to make RQ/VB/FB/PB programmers feel at home with basica.

I don't have any example of APP.BROADCAST, I use some APP.START in the BASIC! Compiler but I don't know what the broadcast adds, or if it adds anything. I'll keep this issue open to see if I have to get rid of it later on (before official release of basica).

I had a quick view at your BROADCAST enhancements and I think they are way more valuable than the existing APP.BROADCAST. I may borrow them from you. By the by, do you have a repository with the code of your changes to RFO BASIC! ?

Can you detail or rephrase your last question? I don't understand it:

Could you give each command a link to a basica(o) example server. When you click, you get exactly the right examples.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/mougino/basica/issues/3#issuecomment-278880880, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFVZINHNclsVusXMc9h_F_LnMBwaLUT-ks5rbBimgaJpZM4L81DB.

mougino commented 7 years ago

Hi Gregor, can you fork the BASIC! GitHub repo and commit your modifications in your fork? Strictly speaking, the GNU GPL V3 forces you to share the whole compilable project, state your changes, and include compiling instructions. I think it's best for the community (they'll be able to use your fork in my tools this way).

I assume IBM lawyers have other things to do than sue a hobby project for using a name last seen 30 years ago. I should be under the radar except if you tell on me ;) Btw GW is a Microsoft product, not an IBM one, but same story...

With basica my goal is to re-write a big part of RFO BASIC! or even entirely I'm still not sure... The work I did end of last year made basica a little far from RFO BASIC! for example the pre-processor doesn't remove all spaces anymore. Also all XMLs were re-written to use material design by default in accordance with latest Google guidelines. I am considering going further and even getting rid of the interpreter model and do a Basic to Java translator + compiler (at least I have the knowledge for that). I give myself no timeline. I currently have to pause it for several months, I may resume it this summer, it would be good if I could deliver something before end of this year.

basica is no big bang. There were discussions by Gikam and evolbug to go beyond RFO BASIC! and create a BASIC! 2.0... basica may be it. Or it may not, it's too early to tell.

Still don't understand your "example server" sorry. Every keyword definition will eventually embed an example, I don't see the point of having one on a different server (?) See https://github.com/mougino/basica/blob/master/manual.md#open-statement for example for the common structure of all keyword definitions (purpose / syntax / restrictions / see also / examples).