/ Forside / Teknologi / Udvikling / VB/Basic / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
VB/Basic
#NavnPoint
berpox 2425
pete 1435
CADmageren 1251
gibson 1230
Phylock 887
gandalf 836
AntonV 790
strarup 750
Benjamin... 700
10  tom.kise 610
Help with adding 2 decimal numbers ! and e~
Fra : Lasse Madsen


Dato : 07-12-00 01:54

Hi there im a 1 year electronics student in denmark which has this problem:

i have 2 values which i want to add (they are vairable) what i tourght i
could do was

text1.text = (example 0.0000004568 or 0.000000000100)
text2.text = (same example as above)
text3.text = result box
as you might have figured is that im trying to add forinstance 10pico(p)
with 1 micro(u)

CODE WHICH DOESNT WORK ???
text3.text = Val(text1.text) + Val(text2.text)

why do the above code doesnt work and what should i do ?
and how could i make the outcome in exponent for instance if the outcome is
0.0001 the it shoud read 1e-4 ??? how can i do this ?

Thanks alot for your reply !

-------------------------
Electronics Student
Lasse Madsen
Højrupsvej 52, 2.m.f.
9900 Frederikshavn
Denmark



 
 
Laurens Brand (07-12-2000)
Kommentar
Fra : Laurens Brand


Dato : 07-12-00 09:39

Text1.Text = 0.0000004568
Text2.Text = 0.0000000001
Text3.Text = Format(CDec(Text1.Text) + CDec(Text2.Text), "Scientific")

Perhaps you can use this

Laurens Brand

"Lasse Madsen" <Lasse.Madsen@Elektronik.dk> schreef in bericht
news:90mm95$7u4$1@news.cybercity.dk...
> Hi there im a 1 year electronics student in denmark which has this
problem:
>
> i have 2 values which i want to add (they are vairable) what i tourght i
> could do was
>
> text1.text = (example 0.0000004568 or 0.000000000100)
> text2.text = (same example as above)
> text3.text = result box
> as you might have figured is that im trying to add forinstance 10pico(p)
> with 1 micro(u)
>
> CODE WHICH DOESNT WORK ???
> text3.text = Val(text1.text) + Val(text2.text)
>
> why do the above code doesnt work and what should i do ?
> and how could i make the outcome in exponent for instance if the outcome
is
> 0.0001 the it shoud read 1e-4 ??? how can i do this ?
>
> Thanks alot for your reply !
>
> -------------------------
> Electronics Student
> Lasse Madsen
> Højrupsvej 52, 2.m.f.
> 9900 Frederikshavn
> Denmark
>
>



Søg
Reklame
Statistik
Spørgsmål : 177551
Tips : 31968
Nyheder : 719565
Indlæg : 6408825
Brugere : 218887

Månedens bedste
Årets bedste
Sidste års bedste