Re: [Gambas-user] Another crash.

2011-01-08 Thread Benoît Minisini
> > Another point. The following code is useless: > > > > #If SYSTEM = "Linux" > > Private sSystem As String = "Linux" > > #Else If SYSTEM = "FreeBSD" > > Private sSystem As String = "FreeBSD" > > #Else If SYSTEM = "OpenBSD" > > Private sSystem As String = "OpenBSD" > > #Else If SYSTEM = "NetBSD"

Re: [Gambas-user] Another crash.

2011-01-08 Thread Benoît Minisini
> This is from GambasTester, when these two lines are uncommented: > pp2 = Pointer@(pp) > Debug Pointer@(pp2) > I fixed that in revision #3451. Now your code raises en error as expected (it reads memory at address 12, which is a forbidden memory address). Regards, -- Benoît Minisini --

Re: [Gambas-user] Another crash.

2011-01-08 Thread Jussi Lahtinen
Argh!! They supposed to be like Str$(3.1415) not Str$("3.1415")... what a mess. I'll fix that later. Jussi 2011/1/9 Benoît Minisini > > > > I don't understand the test that raises "error 84". > > > > Format$() formats a number in a localizable way. Str$() with a string > just > > returns that

Re: [Gambas-user] Another crash.

2011-01-08 Thread Jussi Lahtinen
> Another point. The following code is useless: > > #If SYSTEM = "Linux" > Private sSystem As String = "Linux" > #Else If SYSTEM = "FreeBSD" > Private sSystem As String = "FreeBSD" > #Else If SYSTEM = "OpenBSD" > Private sSystem As String = "OpenBSD" > #Else If SYSTEM = "NetBSD" > Private sSystem A

Re: [Gambas-user] Another crash.

2011-01-08 Thread Benoît Minisini
> > I don't understand the test that raises "error 84". > > Format$() formats a number in a localizable way. Str$() with a string just > returns that string, so it useless. And you compare the localized string > returned by Format$() with an not localized string, so it will fail. Are > you americ

[Gambas-user] ancestor of user classes

2011-01-08 Thread Fabián Flores Vadell
Hi. I believe than not, but I won't leave place to doubts. The users classes have some default ancestor? (I mean, like the class "object" in Python). Thanks. -- Fabián Flores Vadell www.comoprogramarcongambas.blogspot.com www.speedbooksargentina.blogspot.com

Re: [Gambas-user] Another crash.

2011-01-08 Thread Benoît Minisini
> This is from GambasTester, when these two lines are uncommented: > pp2 = Pointer@(pp) > Debug Pointer@(pp2) > > > Starting program: /usr/local/bin/gbx3 -p > [Thread debugging using libthread_db enabled] > mTest.DoTests.307: This Gambas version is somewhat tested for string > errors. mTest.DoT

Re: [Gambas-user] Another crash.

2011-01-08 Thread Benoît Minisini
> This is from GambasTester, when these two lines are uncommented: > pp2 = Pointer@(pp) > Debug Pointer@(pp2) > > > Starting program: /usr/local/bin/gbx3 -p > [Thread debugging using libthread_db enabled] > mTest.DoTests.307: This Gambas version is somewhat tested for string > errors. mTest.DoT

Re: [Gambas-user] [Fwd: Gambas3 Pointers example]

2011-01-08 Thread Demosthenes Koptsis
On Sat, 2011-01-08 at 22:07 +0200, Jussi Lahtinen wrote: > > hMemory = Memory pPointer For Read Write > > Write #hMemory, 10 As Integer > > > > is there any other way that i did not notice? thanks Jussi. i just wondered if there is something else than write instruction for writing into a pointer.

[Gambas-user] Another crash.

2011-01-08 Thread Jussi Lahtinen
This is from GambasTester, when these two lines are uncommented: pp2 = Pointer@(pp) Debug Pointer@(pp2) Starting program: /usr/local/bin/gbx3 -p [Thread debugging using libthread_db enabled] mTest.DoTests.307: This Gambas version is somewhat tested for string errors. mTest.DoTests.1126: Program

Re: [Gambas-user] Crash!

2011-01-08 Thread Jussi Lahtinen
With compiler optimizations removed: Starting program: /usr/local/bin/gbx3 -p [Thread debugging using libthread_db enabled] [New Thread 0x7fffef2ba700 (LWP 19548)] warning: unable to load Qt translation: en_GB.utf8 Program received signal SIGSEGV, Segmentation fault. 0x0042420f in SUBR_le

Re: [Gambas-user] [Fwd: Gambas3 Pointers example]

2011-01-08 Thread Jussi Lahtinen
> hMemory = Memory pPointer For Read Write > Write #hMemory, 10 As Integer > > is there any other way that i did not notice? > I'm not sure I understand what do you mean/need... Documentation gives two options; *WRITE* [ *#* *Stream* *,* ] *Expression* *AS* *Datatype* *WRITE* [ *#* *Stream* *,* ]

Re: [Gambas-user] [Fwd: Gambas3 Pointers example]

2011-01-08 Thread Demosthenes Koptsis
Thanks Jussi! It's nice to understand the language. I didn't say that there was a bug, my mind just did not go to the behavior of WRITE instruction, which it moved the stream pointer after writing the data. I remade the example to show this detail for better comprehension. -

Re: [Gambas-user] [Fwd: Gambas3 Pointers example]

2011-01-08 Thread Jussi Lahtinen
Argh... of course: This uses internal counter: iA = Read #hMemory As Integer This uses pPointer as address: iA = Integer@(pPointer) Jussi On Sat, Jan 8, 2011 at 20:40, Jussi Lahtinen wrote: > Behaviour confirmed with Gambas 3 rev 3447 @ Ubuntu 10.10 64bit. > Though I don't think this is bug,

Re: [Gambas-user] [Fwd: Gambas3 Pointers example]

2011-01-08 Thread Jussi Lahtinen
Behaviour confirmed with Gambas 3 rev 3447 @ Ubuntu 10.10 64bit. Though I don't think this is bug, since stream pointer position moves after write. "Seek #hMemory, 0" will fix that, in this case. See more from documentation of Seek. However I don't know how Interger@ gets correct position... Juss

[Gambas-user] [Fwd: Gambas3 Pointers example]

2011-01-08 Thread Demosthenes Koptsis
But if i write, iA = Integer@(pPointer) Print iA then iA gets the value 10. why is that? what's the difference between iA = Read #hMemory As Integer iA = Integer@(pPointer) ? -- Regards, Demosthenes Koptsis. --- Begin Message --- Hello, i remake an example for pointers in Gambas3-svn3432, u

[Gambas-user] Gambas3 Pointers example

2011-01-08 Thread Demosthenes Koptsis
Hello, i remake an example for pointers in Gambas3-svn3432, ubuntu 10.04 LTS, AMD64 The example is the next: - ' Gambas module file Public Sub Main() Dim pPointer As Pointer Dim hMemory As Stream Dim iA As Integer pPointer = Alloc(SizeOf(gb.Integer)) hMemory = Memory p