vlahonick vlahonick a écrit :
>
> hello all :D
>
> i am trying to create a program that calculates a number from the binary
> numeral system and gives a result
>
> example of what the program will do :
>
> we have the number (at binary numeral system) 10011
>
> so to have result we have to do
On Wednesday 15 April 2009, Jeff Gray wrote:
>
> That's pretty cool.
>
> My only comment would be that it took me a few goes at stepping through the
> code before I worked out how the blazes it worked, so perhaps less readable
> than the exponent version.
>
> But hey - I'm no rocket scientis
That's pretty cool.
My only comment would be that it took me a few goes at stepping through the
code before I worked out how the blazes it worked, so perhaps less readable
than the exponent version.
But hey - I'm no rocket scientist :-)
> From: ron...@tiscali.nl
>
>
>
> function bin2dec(s
Ron_1st a écrit :
> On Tuesday 14 April 2009, Simonart Dominique wrote:
>> PUBLIC SUB Button1_Click()
>> DIM S AS String
>> DIM i, y, N AS Integer
>>
>> S = TextArea1.Text
>> y = Len(S)
>> if y = 0 THEN RETURN
>> N = 0
>> FOR i = 1 to y
>>d = Val(Mid(S, i, 1)) ' I assume
On Tuesday 14 April 2009, Simonart Dominique wrote:
> PUBLIC SUB Button1_Click()
> DIM S AS String
> DIM i, y, N AS Integer
>
> S = TextArea1.Text
> y = Len(S)
> if y = 0 THEN RETURN
> N = 0
> FOR i = 1 to y
> d = Val(Mid(S, i, 1)) ' I assume that d is 0 or 1
> N
End If
>
> Next i
>
> End Function
>
>
>
> very best regards
>
> Emil
>
>
>
>
> -Ursprüngliche Nachricht-
> Von: Simonart Dominique [mailto:simonart.domini...@wanadoo.fr]
> Gesendet: Dienstag, 14. April 2009 14:04
> An: mail
Ursprüngliche Nachricht-
Von: Simonart Dominique [mailto:simonart.domini...@wanadoo.fr]
Gesendet: Dienstag, 14. April 2009 14:04
An: mailing list for gambas users
Betreff: Re: [Gambas-user] binary numeral system
vlahonick vlahonick a écrit :
>
> hello all :D
>
> i am trying to create a progr
vlahonick vlahonick a écrit :
>
> hello all :D
>
> i am trying to create a program that calculates a number from the binary
> numeral system and gives a result
>
> example of what the program will do :
>
> we have the number (at binary numeral system) 10011
>
> so to have result we have to do
regards
Emil
-Ursprungliche Nachricht-
Von: vlahonick vlahonick [mailto:tsopanotr...@hotmail.com]
Gesendet: Dienstag, 14. April 2009 11:22
An: gambas-user@lists.sourceforge.net
Betreff: [Gambas-user] binary numeral system
hello all :D
i am trying to create a program that calculates a
hello all :D
i am trying to create a program that calculates a number from the binary
numeral system and gives a result
example of what the program will do :
we have the number (at binary numeral system) 10011
so to have result we have to do (1*2^4)+(0*2^3)+(0*2^2)+(1*2^1)+(1*2^0)=
16+0+0+2+1
10 matches
Mail list logo