Re: [Gambas-user] To wish list; optional compiler warning

2011-09-11 Thread Jussi Lahtinen
Good choice. Jussi 2011/9/11 Benoît Minisini > > > > I think I go with the array solution, though I was hoping for something > > more elegant. > > > > Thanks, > > Jussi > > I know, but I usually sacrify elegance for performance. > > -- > Benoît Minisini > > > --

Re: [Gambas-user] To wish list; optional compiler warning

2011-09-11 Thread Benoît Minisini
> > I think I go with the array solution, though I was hoping for something > more elegant. > > Thanks, > Jussi I know, but I usually sacrify elegance for performance. -- Benoît Minisini -- Using storage to extend the

Re: [Gambas-user] To wish list; optional compiler warning

2011-09-11 Thread Jussi Lahtinen
> You are right with the fact that the compiler should issue a warning. But > it > cannot know everytime that the called function needs a ByRef, as soon as > the > function is in another class. Maybe I should have allowed ByRef in private > functions only... > OK, I understand. Maybe there should

Re: [Gambas-user] Issue 104 in gambas: Byte[].FromString does not work

2011-09-11 Thread gambas
Updates: Status: Fixed Comment #2 on issue 104 by benoit.m...@gmail.com: Byte[].FromString does not work http://code.google.com/p/gambas/issues/detail?id=104 Thanks! Fixed in revision #4114. -- Using storage t

Re: [Gambas-user] Issue 104 in gambas: Byte[].FromString does not work

2011-09-11 Thread gambas
Updates: Status: Accepted Labels: -Version Version-TRUNK Comment #1 on issue 104 by benoit.m...@gmail.com: Byte[].FromString does not work http://code.google.com/p/gambas/issues/detail?id=104 (No comment was entered for this change.) ---

Re: [Gambas-user] issues updated records in Sqlite3 database using edit()

2011-09-11 Thread Benoît Minisini
> Just figured out my mistake, it was that in my database the column types > were INTEGER and not INT4. Once I changed it to INT4 everything started > working great. Sorry to bother! > No problem. You must be aware that sqlite does not use datatypes, so I have to simulate them by using the datat

Re: [Gambas-user] To wish list; optional compiler warning

2011-09-11 Thread Benoît Minisini
> Problem is that my functions are like; ConnectThese(iWithTerm, ByRef > iVariable1, Byref iVariable2). > > Jussi > You are right with the fact that the compiler should issue a warning. But it cannot know everytime that the called function needs a ByRef, as soon as the function is in another c

Re: [Gambas-user] gb3: writing variables to a string using a memory stream and pointer

2011-09-11 Thread Benoît Minisini
> My code looks like this: > > ' For writing outgoing UDP data to memory. > Public data As String > Public mem As Stream > > ' Create data string for outgoing transaction queue. > data = Space(8) > mem = Memory VarPtr(data) For Write > mem.Begin >Write #mem, (Server.DateCurrent + Server.DateU

Re: [Gambas-user] To wish list; optional compiler warning

2011-09-11 Thread Jussi Lahtinen
Problem is that my functions are like; ConnectThese(iWithTerm, ByRef iVariable1, Byref iVariable2). Jussi 2011/9/11 Fabián Flores Vadell > 2011/9/10 Jussi Lahtinen > > > > > What is the alternative then? Pass variables as pointers? > > Making almost needless class for couple variables doesn't

Re: [Gambas-user] To wish list; optional compiler warning

2011-09-11 Thread Fabián Flores Vadell
2011/9/10 Jussi Lahtinen > > What is the alternative then? Pass variables as pointers? > Making almost needless class for couple variables doesn't seem good > option... > > Jussi > Pass variables as pointer, will work (I think). But, ¿is necessary? Could you just use functions to return values?

Re: [Gambas-user] To wish list; optional compiler warning

2011-09-11 Thread Fabián Flores Vadell
2011/9/9 Fabien Bodard > yes like : > > Private Function ModifyThat(byRef i as integer) as boolean > > i+=6*4 > > catch > return true > > end > > > > to use it > > if not Modifythat(ByRef iMyVal) Then Print iMyVal > > > sometime it can be usefull to catch the error in the calling function > I

Re: [Gambas-user] gb3: writing variables to a string using a memory stream and pointer

2011-09-11 Thread tobias
On 11.09.2011 06:40, Kevin Fishburne wrote: > My code looks like this: > > ' For writing outgoing UDP data to memory. > Public data As String > Public mem As Stream > > ' Create data string for outgoing transaction queue. > data = Space(8) > mem = Memory VarPtr(data) For Write > mem.Begin > Wri

Re: [Gambas-user] gb3: writing variables to a string using a memory stream and pointer

2011-09-11 Thread Jussi Lahtinen
Not sure what happen there, but try this: Public pData As Pointer Public mem As Stream pData = Alloc(SizeOf(gb.Float)) mem = Memory pData For Write mem.Begin Write #mem, (Server.DateCurrent + Server.DateUTC) As Float mem.Send Print Float@(pData) Jussi On Sun, Sep 11, 2011 at 07:40, Kevin