English
Source / code snippets

computer for electrical thrill, power, performance and resistance

 

p.specht

for electrician and the (unfortunately seldom gewordenen) electronics-handyman is with the Bauteileauswahl The investigation of Kennwerten for Bauelemente important.
Window Title "      p.specht´s   u I P R    Einphasen-Rechner"
' (D) demonstration by P.woodpecker, Vienna/Austria. NO WARRANTY WHATSOEVER!
Window Style 24:font 2:set("decimals",17)
'  Window 200,100 - 400,175
Declare u!,I!,P!,R!, u$,i$,p$,r$ , l1$,l2$,l3$
font 2:print "\n  this computer verknüpft The four sizes "
print "  thrill, power, performance and resistance. "
font 0:print "    The last both Inputs represent the "
print "    each pretended sizes dar. The on-"
print "    its both values go errechnet and "
font 2:print "    are  fetter Font displayed."
font 0:print " RETURN jumping of area To area. without Einga-"
print "    evaluate (zB: 1e-6) becomes nothing changed,"
print "    separate only weitergesprungen! ";
font 2:print "   [Start]";:waitinput
Repeat:Cls:Print "Geg.:"

if (l1$="U") or (l2$="U"):font 0:else:font 2:endif

    locate 3,1 :Print l1$;l2$;"   thrill u [Volt V] =                         ";
    locate 3,26:Print stature$("%g",u!);

    if (l1$="I") or (l2$="I"):font 0:else:font 2:endif

        locate 5,1 :Print l1$;l2$;"   power I  [amp A] =                         ";
        locate 5,26:Print stature$("%g",I!);

        if (l1$="P") or (l2$="P"):font 0:else:font 2:endif

            locate 7,1 :Print l1$;l2$;"   performance P [Watt W] =                         ";
            locate 7,26:Print stature$("%g",P!);

            if (l1$="R") or (l2$="R"):font 0:else:font 2:endif

                locate 9,1 :Print l1$;l2$;"   resistance R  [ohm] =                         ";
                locate 9,26:Print stature$("%g",R!);
                locate 3,26:input u$:if u$>"":u!=val(u$):l3$=l2$:l2$=l1$:l1$="U":goto "calc":endif
                locate 5,26:input i$:if i$>"":I!=val(i$):l3$=l2$:l2$=l1$:l1$="I":goto "calc":endif
                locate 7,26:input p$:if p$>"":P!=val(p$):l3$=l2$:l2$=l1$:l1$="P":goto "calc":endif
                locate 9,26:input r$:if r$>"":R!=abs(val(r$)):l3$=l2$:l2$=l1$:l1$="R":goto "calc":endif
                calc:

                if l1$="U"

                    if l2$="U":l2$=l3$:l3$="" :goto "calc"

                    elseif l2$="I":P!=u!*I!:case i!=0:i!=val("1e-50"):R!=abs(u!/I!)

                    elseif l2$="P":case u!=0:u!=val("1e-50"):I!=P!/u!:case P!=0:P!=val("1e-50"):R!=abs(sqr(u!)/P!)

                    elseif l2$="R":case r!=0:r!=val("1e-50"):I!=u!/R!:P!=sqr(u!)/R!

                    endif

                elseif l1$="I"

                    if l2$="U":P!=u!*I!:case i!=0:i!=val("1e-50"):R!=abs(u!/I!)

                    elseif l2$="I":l2$=l3$:l3$="" :goto "calc"

                    elseif l2$="P":case i!=0:i!=val("1e-50"):u!=P!/I!:R!=abs(P!/sqr(I!))

                    elseif l2$="R":u!=I!*R!:P!=sqr(I!)*R!

                    endif

                elseif l1$="P"

                    if l2$="U":case u!=0:u!=val("1e-50"):I!=P!/u!:case P!=0:P!=val("1e-50"):R!=abs(sqr(u!)/P!)

                    elseif l2$="I":case i!=0:i!=val("1e-50"):u!=P!/I!:R!=abs(P!/sqr(I!))

                    elseif l2$="P":l2$=l3$:l3$="" :goto "calc"

                    elseif l2$="R":u!=sqrt(abs(P!*R!)):case R!=0:R!=val("1e-50"):I!=sqrt(abs(P!/R!))

                    endif

                elseif l1$="R"

                    if l2$="U":case r!=0:r!=val("1e-50"):I!=u!/R!:P!=sqr(u!)/R!

                    elseif l2$="I":u!=I!*R!:P!=sqr(I!)*R!

                    elseif l2$="P":u!=sqrt(abs(P!*R!)):case R!=0:R!=val("1e-50"):I!=sqrt(abs(P!/R!))

                    elseif l2$="R":l2$=l3$:l3$="" :goto "calc"

                    endif

                endif

            until 0

 
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
05/23/21  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.417 Views

Untitledvor 0 min.
ecki07/29/23
Stringray05/09/22
Michael W.03/30/22
Thomas Zielinski12/02/21
More...

Themeninformationen

this Topic has 1 subscriber:

p.specht (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie