On 05/04/2010 02:03 PM, Benoît Minisini wrote:
>>> I feel something weird in using an integer variable as if it was a
>>> string, and the above snippet does that.
>>>
>> As I said earlier, it is sometimes useful. Datatype is integer because
>> all other usage of that variable is mundane
Intel Core2 Quad Q9550
Jussi
2010/5/4 Benoît Minisini :
>> Same result with Gambas 2.20 @ Ubuntu 10.04 64bit.
>> I haven't recompile after upgrade from Ubuntu 9.10, can this be reason for
>> bug? I'll try recompile later.
>>
>> Jussi
>>
>
> What's your CPU?
>
> --
> Benoît Minisini
>
> -
> Same result with Gambas 2.20 @ Ubuntu 10.04 64bit.
> I haven't recompile after upgrade from Ubuntu 9.10, can this be reason for
> bug? I'll try recompile later.
>
> Jussi
>
What's your CPU?
--
Benoît Minisini
--
___
Same result with Gambas 2.20 @ Ubuntu 10.04 64bit.
I haven't recompile after upgrade from Ubuntu 9.10, can this be reason for bug?
I'll try recompile later.
Jussi
2010/5/4 Benoît Minisini :
>> > I feel something weird in using an integer variable as if it was a
>> > string, and the above snippet
On 05/05/10 02:03, Benoît Minisini wrote:
>>> I feel something weird in using an integer variable as if it was a
>>> string, and the above snippet does that.
>>>
>> As I said earlier, it is sometimes useful. Datatype is integer because
>> all other usage of that variable is mundane math.
>
> > I feel something weird in using an integer variable as if it was a
> > string, and the above snippet does that.
>
> As I said earlier, it is sometimes useful. Datatype is integer because
> all other usage of that variable is mundane math.
> But of course there are many other ways to do same
>
> Ok, now I understand the two code snippets above. The net result should
> be an integer having value 9876543210. Apart from the fact that a simple
> assignment does the same work, which leads me to think that Jussi wanted
> something else, I am still not convinced about the casting (or, better
>
> The problem is not very clear to me, but the following should be right:
> gambas uses operators to cast its operands; if it was not so, then why
> use "&" instead "+" to concatenate strings? But, when you use notations
> like "+=", you have a variable on the left (an L-Value), not a value you
> Ok, now I understand the two code snippets above. The net result should
> be an integer having value 9876543210. Apart from the fact that a simple
> assignment does the same work, which leads me to think that Jussi wanted
> something else, I am still not convinced about the casting (or, better,
>
Doriano Blengino ha scritto:
> Benoît Minisini ha scritto:
>
>>> Benoît Minisini ha scritto:
>>>
>>>
> Hi!
> There's minor bug.
> Overflow with concatenate operator causes wrong error message.
> You can reproduce the bug with this code:
>
> Dim ii As Integer
>
Benoît Minisini ha scritto:
>> Benoît Minisini ha scritto:
>>
Hi!
There's minor bug.
Overflow with concatenate operator causes wrong error message.
You can reproduce the bug with this code:
Dim ii As Integer
Dim jj As Integer
For ii = 9 To 0 Step -1
> For information, the previous code is equivalent to:
>
> Dim ii As Integer
> Dim jj As Integer
>
> For ii = 9 To 0 Step -1
> jj = CInt(CStr(jj) & CStr(ii))
> Next
Yes, exactly.
Sometimes it is convenient to "add" numbers this way.
I just didn't see the trouble to write conversion functions C
> Benoît Minisini ha scritto:
> >> Hi!
> >> There's minor bug.
> >> Overflow with concatenate operator causes wrong error message.
> >> You can reproduce the bug with this code:
> >>
> >> Dim ii As Integer
> >> Dim jj As Integer
> >>
> >> For ii = 9 To 0 Step -1
> >> jj&= ii<--- Wanted Integer go
Benoît Minisini ha scritto:
>> Hi!
>> There's minor bug.
>> Overflow with concatenate operator causes wrong error message.
>> You can reproduce the bug with this code:
>>
>> Dim ii As Integer
>> Dim jj As Integer
>>
>> For ii = 9 To 0 Step -1
>> jj&= ii<--- Wanted Integer got String instead.
>> Nex
> Hi!
> There's minor bug.
> Overflow with concatenate operator causes wrong error message.
> You can reproduce the bug with this code:
>
> Dim ii As Integer
> Dim jj As Integer
>
> For ii = 9 To 0 Step -1
> jj &= ii <--- Wanted Integer got String instead.
> Next
>
> Gambas 3 rev 2879 @ Ubuntu
Hi!
There's minor bug.
Overflow with concatenate operator causes wrong error message.
You can reproduce the bug with this code:
Dim ii As Integer
Dim jj As Integer
For ii = 9 To 0 Step -1
jj &= ii <--- Wanted Integer got String instead.
Next
Gambas 3 rev 2879 @ Ubuntu 9.10 64bit
Jussi
---
16 matches
Mail list logo