🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.basic.visual
Article #284

Re: Help with adding 2 decimal numbers ! and exponents

#284
From: Richard Kitchen
Date: Thu, 07 Dec 2000 02:36
41 lines
2916 bytes
Try this:
val1# = val(text1.text)
val2# = val(text2.text)
text3 = str(val1 + val2)

Hope this helps

Richard Kitchen

"Lasse Madsen" <Lasse.Madsen@Elektronik.dk> wrote in message
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
>
>
Technical Details
Message-ID: <bJCX5.64000$3u1.19498111@news3.rdc1.on.home.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-01!supernews.com!newshub2.rdc1.sfba.home.com!news.home.com!news3.rdc1.on.home.com.POSTED!not-for-mail
References: <90mm95$7u4$1@news.cybercity.dk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f94ee,fc0b475605443650
X-Google-Attributes: gidf94ee,public
X-Google-Thread: 106fd2,fc0b475605443650
X-Google-Attributes: gid106fd2,public
X-Google-Thread: 12aaa3,fc0b475605443650
X-Google-Attributes: gid12aaa3,public
X-Google-Thread: 10cf61,fc0b475605443650
X-Google-Attributes: gid10cf61,public
X-Google-Thread: 107824,fc0b475605443650
X-Google-Attributes: gid107824,public
X-Google-Thread: f645d,fc0b475605443650
X-Google-Attributes: gidf645d,public
X-Google-Thread: fb992,fc0b475605443650
X-Google-Attributes: gidfb992,public
X-Google-Thread: f51ba,fc0b475605443650
X-Google-Attributes: gidf51ba,public
X-Google-ArrivalTime: 2000-12-06 18:36:55 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-01!supernews.com!newshub2.rdc1.sfba.home.com!news.home.com!news3.rdc1.on.home.com.POSTED!not-for-mail
From: "Richard Kitchen" <richmk@home.com>
Newsgroups: comp.lang.basic.visual,comp.lang.visual.basic,dk.edb.programmering.basic.visual-basic,fj.comp.lang.visualbasic,free.it.programmazione.visualbasic,free.it.visual-basic,microsoft.private.mvp.VisualBasic,microsoft.public.USASalesInfo.Developer.VisualB
References: <90mm95$7u4$1@news.cybercity.dk>
Subject: Re: Help with adding 2 decimal numbers ! and exponents
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Message-ID: <bJCX5.64000$3u1.19498111@news3.rdc1.on.home.com>
Date: Thu, 07 Dec 2000 02:36:55 GMT
NNTP-Posting-Host: 24.42.155.242
X-Complaints-To: abuse@home.net
X-Trace: news3.rdc1.on.home.com 976156615 24.42.155.242 (Wed, 06 Dec 2000 18:36:55 PST)
NNTP-Posting-Date: Wed, 06 Dec 2000 18:36:55 PST
Organization: Excite@Home - The Leader in Broadband http://home.com/faster