[Gambas-user] Array.Sort

T Lee Davidson t.lee.davidson at ...626...
Fri Jan 9 01:09:02 CET 2015


"The empty set of parentheses is REQUIRED when sort is used as a function to return an array without the optional mode parameter"

I don't know. Wouldn't it be more accurate to say that the parentheses are required to be able to use the function call as the object which it 
returns; as opposed to the syntax, without the parentheses, referring to the function itself?


Lee
__________

"Artificial Intelligence is no match for natural stupidity."

On 01/08/2015 06:56 PM, Lewis Balentine wrote:
> On 01/08/2015 07:19 AM, Tobias Boege wrote:
>> Array.Sort() is a *method* :-)
>
> The basic (pun intended) elements of all OOP languages are classes
> constructed of properties and methods.
> --- you got me on that one
>
> In GAMBAS there seem to be several class methods defined that sometimes
> require parenthesis and sometimes do not. I was trying to
> determine/define the conditions that delimit when those parenthesis are
> required using familiar BASIC terms ... as in:
>       Public/Private Function  foo () as data type
>       Public/Private Sub  foo ()
> both of which I believe are appropriately considered methods in OOP
> languages.
>
> I believe my second formal computer class was MBASIC on a Osborn CPM
> computer (4 inch green screen). I am trying to recall if the term
> "Function" was defined in that language but those gray cells are no
> longer responding reliably. The other option was "Go to" that eventually
> evolved into "Public/Private Sub". At the time we called those
> "procedures".  I still call them "procedures" to distinguish them from a
> "function" that by definition is supposed to return something.
>
> Take a look at what I put in the WiKi and let me know if I should change it.
> http://gambaswiki.org/wiki/comp/gb/string[]/sort
> ... and if someone insists I will go back and change the variables to
> Hungarian notation but personally I find it more confusing than enlighting.
>
> Cheers,
>
> Lewis
>
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming! The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net
> _______________________________________________
> 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