[Gambas-user] MOD arithetic operator
Demosthenes Koptsis
demosthenesk at ...626...
Tue Nov 9 09:58:56 CET 2010
Hi to all, and good morning.
Dont worry you dont hurt me. :)
I am not a C++ person not at all.
Of course there is no need to turn Basic in C style.
But i make a notice about DIV and MOD.
The one of them has a synonmous as operator.
The only thing i propose is to maintain a same "thinking" while reading
the manual with programming style.
To do this there are two options
- MOD and DIV should not have operators
- MOD and DIV it is nice to have operators.
Or we leave the things as they are.
All options are respectfull ones.
On Tue, 2010-11-09 at 09:08 +0100, Doriano Blengino wrote:
> user ha scritto:
> > i am not the person that should answer but i will as i understood well
> > as possible the concept of Gambas ..
> >
> > i think Gambas concept is to keep a Basic style language as possible
> > can. So an % operator is a foreign word for a Basic language.
> >
> > >From the other hand it would be nice Gambas to be a better Basic
> > language with the meaning to have the good things of other languages but
> > with Basic style so to be an advanced Basic more strong to be near other
> > Linux style languages.
> >
> > As i know Basic does not have pointers either.
> > But Gambas 3 has!
> >
> > And the EXTERN function leads things more than a Basic language.
> >
> > So in my opinion an % operator is not so big deal thing to be out of a
> > Basic language.
> >
> Sorry to drop in - I only want to point out that MOD *is* an operator,
> and works just like "%".
> By putting "%" in gambas, you could do modulus using a single keystroke
> instead of three (five, counting the necessary spaces around...). You
> would also gain then "%=" operation (I wonder who in gambas misses
> things like this one). This could be a great deal, perhaps... but I
> don't think (just my opinion). I can not understand why people knowing C
> and C++ would like to turn gambas in a language where it is possible to
> write things like
>
> while (c%=*++b->h!=!n^k);
>
> Is it so painful to write "a = c mod b" instead of "a = c % b"? There
> are not enough symbols on the keyboard to express all the possible
> operations... so let stay with the most useful ones (the four arithmetic
> operations). I think that the integer division "\" should disappear, in
> favor of DIV. Would you say, instead, that gambas needs also &, &&, |,
> ||, and so on? No? Why not? It's the same as "%"...
>
> Hope to not having hurted you: it's just my opinion which contrasts with
> you... :-)
>
> Regards,
> Doriano
>
>
>
>
> > Indeed i suggest it as a wish/new feature if you like.
> >
> > But all depends how Basic like style we want to keep.
> >
> > On Tue, 2010-11-09 at 08:25 +0100, Fabien Bodard wrote:
> >
> >> in another hand.... i don't understand the existance of the DIV
> >> operator :/ ... if DIV exist why not ADD/MINUS/MULT ?
> >>
> >> so ... i'm agree with user ... why not add the % synonymous ?
> >>
> >> this is not consistent
> >>
> >>
> >> 2010/11/9 user <demosthenesk at ...626...>:
> >>
> >>> This question was created to me when i saw the MOD function in
> >>> arithmetic operators without a an operator as the DIV has one.
> >>>
> >>> http://gambasdoc.org/help/cat/arithop
> >>>
> >>> On Mon, 2010-11-08 at 20:02 +0100, Benoît Minisini wrote:
> >>>
> >>>>> I know that there is MOD
> >>>>>
> >>>>> but i ask this question cause i compare the C++ operators with Gambas.
> >>>>>
> >>>>> As there is DIV and \ operator
> >>>>> i was questioned why MOD has not an operator as % for example in C++
> >>>>>
> >>>>>
> >>>> Because Gambas is a Basic, and the Basic languages I know do not use "%" as
> >>>> operator.
> >>>>
> >>>>
> >>>
> >>> ------------------------------------------------------------------------------
> >>> The Next 800 Companies to Lead America's Growth: New Video Whitepaper
> >>> David G. Thomson, author of the best-selling book "Blueprint to a
> >>> Billion" shares his insights and actions to help propel your
> >>> business during the next growth cycle. Listen Now!
> >>> http://p.sf.net/sfu/SAP-dev2dev
> >>> _______________________________________________
> >>> Gambas-user mailing list
> >>> Gambas-user at lists.sourceforge.net
> >>> https://lists.sourceforge.net/lists/listinfo/gambas-user
> >>>
> >>>
> >>
> >>
> >
> >
> >
> > ------------------------------------------------------------------------------
> > The Next 800 Companies to Lead America's Growth: New Video Whitepaper
> > David G. Thomson, author of the best-selling book "Blueprint to a
> > Billion" shares his insights and actions to help propel your
> > business during the next growth cycle. Listen Now!
> > http://p.sf.net/sfu/SAP-dev2dev
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
>
> ------------------------------------------------------------------------------
> The Next 800 Companies to Lead America's Growth: New Video Whitepaper
> David G. Thomson, author of the best-selling book "Blueprint to a
> Billion" shares his insights and actions to help propel your
> business during the next growth cycle. Listen Now!
> http://p.sf.net/sfu/SAP-dev2dev
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
More information about the User
mailing list