English
Source / code snippets

Age, old

 

Michael
W.

Cls
' old to charge (Pi time thumb)
' The Konstanten respect too one bisserl on Schaltjahres-Gedöhns
' Startdatum, Endedatum
' though the XProfan-Time a others Startwert has (not year 0 separate 1900),
' is the difference similar and can therefore uses go.
' benefit with Time - the worth is accurate, if one too times angibt.

Proc Age

    Parameters int T1,M1,J1, T2,M2,J2
    Declare int T3,M3,J3,  float f
    Var float cJ = 365.2425
    Var float cM = 30.4375
    f = (J2 * cJ) + (M2 * cM) + T2
    f = f - ((J1 * cJ) + (M1 * cM) + T1)'yields almost same difference How XProfan-Time
    J3 = Int(f / cJ) : f = f - (cJ * J3)
    M3 = Int(f / cM) : f = f - (cM * M3)
    T3 = Int(f + 0.5)
    Return J3' from Laziness becomes only Number of years supplied

ENDPROC

' xAge mind too The times (operates with Zeitpunkten; ex X2)

Proc xAge

    Parameters float DatumAlt, DatumNeu
    Declare int T,M,J,  float f
    Var float cJ = 365.2425
    Var float cM = 30.4375
    f = DatumNeu - DatumAlt
    J = Int(f / cJ) : f = f - (cJ * J)
    M = Int(f / cM) : f = f - (cM * M)
    T = Int(f + 0.5)
    Return stature$("%u J, ",J) + stature$("%u M, ",M) + stature$("%u T",T)

ENDPROC

Print "\n old to charge \n"
Print " Age: "; Age(27,12,1961, 18,3,2016)
Print "xAge: "; xAge( dt("SetDate", "27.12.1961"), dt("SetDate", "18.03.2016") )
WaitInput
End
 
System: Windows 8/10, XProfan X4
Programmieren, das spannendste Detektivspiel der Welt.
03/20/16  
 



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

4.036 Views

Themeninformationen

this Topic has 1 subscriber:

Michael W. (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