Re: [Gambas-user] Array.Sort

2015-01-09 Thread Lewis Balentine
I did not expect this many comments. I believe that the KISS principle should apply to the Wiki particularly for the benefit of new users or those whose first language may not be English (my British friends tell me that English is not my first language). I removed references to procedure and

Re: [Gambas-user] Array.Sort

2015-01-09 Thread Tobias Boege
On Fri, 09 Jan 2015, adamn...@gmail.com wrote: On Fri, 09 Jan 2015 01:12:50 +0100 Beno?t Minisini gam...@users.sourceforge.net wrote: Le 09/01/2015 01:09, T Lee Davidson a ?crit : The empty set of parentheses is REQUIRED when sort is used as a function to return an array without the

Re: [Gambas-user] Array.Sort

2015-01-08 Thread Lewis Balentine
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

Re: [Gambas-user] Array.Sort

2015-01-08 Thread adamn...@gmail.com
On Fri, 09 Jan 2015 01:12:50 +0100 Benoît Minisini gam...@users.sourceforge.net wrote: Le 09/01/2015 01:09, T Lee Davidson a écrit : 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

Re: [Gambas-user] Array.Sort

2015-01-08 Thread T Lee Davidson
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

Re: [Gambas-user] Array.Sort

2015-01-08 Thread Benoît Minisini
Le 09/01/2015 00:56, Lewis Balentine a écrit : 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

Re: [Gambas-user] Array.Sort

2015-01-08 Thread Benoît Minisini
Le 09/01/2015 01:09, T Lee Davidson a écrit : 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

Re: [Gambas-user] Array.Sort

2015-01-08 Thread T Lee Davidson
On 01/08/2015 07:12 PM, Benoît Minisini wrote: Le 09/01/2015 01:09, T Lee Davidson a écrit : 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

Re: [Gambas-user] Array.Sort

2015-01-08 Thread Tobias Boege
On Wed, 07 Jan 2015, Lewis Balentine wrote: Do I have it correct now ?? The program runs and operates as expected. My concern is more to the proper nomenclature than function. Array.Sort() is a *method* :-) It rearranges the elements of the object it is applied to and returns that object

Re: [Gambas-user] Array.Sort

2015-01-07 Thread Lewis Balentine
No ... I was not forgetting. I have not yet learned they are required ... ... but this old dog 'will' learn the new tricks. Thank thee again. Lewis On 01/07/2015 06:09 PM, T Lee Davidson wrote: Hi Lewis, You're forgetting, like I often do, the parentheses for the method [.Sort()].

Re: [Gambas-user] Array.Sort

2015-01-07 Thread Lewis Balentine
oops Last line should be: Print 'array.max'returns index of the last item in an array: XXX.max On 01/07/2015 11:59 PM, Lewis Balentine wrote: Print 'array.max'returns the number of items in an array: XXX.max Quit End

Re: [Gambas-user] Array.Sort

2015-01-07 Thread Lewis Balentine
Do I have it correct now ?? The program runs and operates as expected. My concern is more to the proper nomenclature than function. Regards, Lewis Balentine '--- --- (project archive attached to message) --- --- Private Function TestFunction() As String[] Return [abcdefghij, 1234567890,

[Gambas-user] Array.Sort

2015-01-07 Thread Lewis Balentine
I was playing around trying to learn how to pass string arrays back and forth. I then looked at the array.sort function. The prototype in the Wiki indicates that it returns an string[]. Function Sort([Mode As Integer]) As String[] However it seems that I can not use the returned

Re: [Gambas-user] Array.Sort

2015-01-07 Thread Jussi Lahtinen
Test with parenthesis. XXX.Sort() Jussi On Thu, Jan 8, 2015 at 12:55 AM, Lewis Balentine le...@keywild.com wrote: I was playing around trying to learn how to pass string arrays back and forth. I then looked at the array.sort function. The prototype in the Wiki indicates that it returns an

Re: [Gambas-user] Array.Sort

2015-01-07 Thread T Lee Davidson
Hi Lewis, You're forgetting, like I often do, the parentheses for the method [.Sort()]. ... XXX = TestFunction().Sort() DoPrint(XXX.Sort()) DoPrint(TestFunction().Sort()) For Each S In XXX.Sort() Print S Next Print --- For Each S In TestFunction().Sort()