[Gambas-user] 2D-Array ?
wally
wally at ...2037...
Sun Oct 23 10:00:10 CEST 2011
:)
-ve is negative
+ve is positive
never seen this before, thx
On Sunday, October 23, 2011 09:43:23 Caveat wrote:
> Don't shoot me for stating the obvious, but -ve means negative.
>
> So I guess Bruce is just saying that intuitively he'd expect
> round(float, int) to look like round(my_float, 2) if you wanted to round
> my_float to 2 decimal places but in fact you need round(my_float, -2).
>
> Kind regards,
> Caveat
>
> On Sun, 2011-10-23 at 09:20 +0200, wally wrote:
> > On Sunday, October 23, 2011 08:16:07 Bruce Bruen wrote:
> > > On Sun, 2011-10-23 at 05:27 +0200, wally wrote:
> > > > Hi,
> > > >
> > > > more important as the following question itself, is where may i find
> > > > the answer myself without this mailinglist ?
> > > > I always have problems to find sufficient documentation on gambas :(
> > > > Where to search for it ?
> > > > How to search the mailinglist archive ?
> > > >
> > > > How can i do the following C code in a Public Sub Button1_Click()
> > > > in Gambas 3 ?
> > > >
> > > > int main() {
> > > >
> > > > int i;
> > > >
> > > > float arr[][2] = { {1.2, 3.4} , {4.5, 5.6} , {7.8 , 8.9} };
> > > > <-- ???
> > > >
> > > > printf("%i \n", sizeof(arr)/sizeof(float)/2);
> > > > for (i=0;i<(sizeof(arr)/sizeof(float)/2);i++) {
> > > >
> > > > printf("%2.2f \t %2.2f \n",arr[i][0],arr[i][1]);
> > > >
> > > > }
> > > >
> > > > return 0;
> > > > }
> > >
> > > Public Sub Button1_Click()
> > >
> > > Dim i As Integer
> > > Dim arr As Float[][]= [[1.11111, 2.23456], [2.27654, 3.3], [3.4,
> > >
> > > 4.50], [123456.789, 987654.321]]
> > >
> > > For i = 0 To arr.Max
> > >
> > > Print Round(arr[i][0], -2), Round(arr[i][1], -2)
> > >
> > > Next
> > >
> > > End
> > >
> > > Apart from Round(float,int) accepting a -ve number which is well
> > > explained in the help, I would have thought the rest was intuitively
> > > obvious to even the most casual of observer :-)
> > >
> > > I've said this before and no doubt I'll say it again, the gambas help
> > > is very succinct. Read every word in a help page and consider what it
> > > means.
> > > hth
> > > Bruce
> > > -----------------------------------------------------------------------
> > > ---- --- The demand for IT networking professionals continues to grow,
> > > and the demand for specialized networking skills is growing even more
> > > rapidly. Take a complimentary Learning at ...2709... Self-Assessment and learn
> > > about Cisco certifications, training, and career opportunities.
> > > http://p.sf.net/sfu/cisco-dev2dev
> > > _______________________________________________
> > > Gambas-user mailing list
> > > Gambas-user at lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> > Hi Bruce,
> >
> > thank you
> > I tried "{ }" and "( )" but not "[ ]" :)
> >
> > what does this sentence mean
> >
> > > Apart from Round(float,int) accepting a -ve number ... "
> >
> > wally
> >
> >
> >
> > -------------------------------------------------------------------------
> > ----- The demand for IT networking professionals continues to grow, and
> > the demand for specialized networking skills is growing even more
> > rapidly. Take a complimentary Learning at ...2709... Self-Assessment and learn
> > about Cisco certifications, training, and career opportunities.
> > http://p.sf.net/sfu/cisco-dev2dev
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>
> ---------------------------------------------------------------------------
> --- The demand for IT networking professionals continues to grow, and the
> demand for specialized networking skills is growing even more rapidly.
> Take a complimentary Learning at ...2709... Self-Assessment and learn
> about Cisco certifications, training, and career opportunities.
> http://p.sf.net/sfu/cisco-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