'**************************************************************************** ' ' aktuellen Wochtag ermitteln in PowerBASIC 3.0/3.2 ' ' entwickelt von / developed by : Thomas Gohel ' Fido : Thomas Gohel@2:2410/330.1 ' InterNet: author@pbsound.snafu.de ' Homepage: http://www.snafu.de/~pbsound/ ' '**************************************************************************** DECLARE FUNCTION GetDatum() PUBLIC Tag$, WochenTag$, Monat$, Jahr$, Datum$ GetDatum PRINT "Es ist "; WochenTag$;" der ";Datum$ END FUNCTION GetDatum public ! mov ah, &h2A ! int &h21 ! mov WochenTag%, al ! mov Tag%, dl ! mov Monat%, dh ! mov Jahr%, cx Jahr$ = USING$("####", Jahr%) Monat$ = USING$("##.", Monat%) Tag$ = USING$("##.", Tag%) SELECT CASE Wochentag% CASE 0: Wochentag$ = "Sonntag" CASE 1: Wochentag$ = "Montag" CASE 2: Wochentag$ = "Dienstag" CASE 3: Wochentag$ = "Mittwoch" CASE 4: Wochentag$ = "Donnerstag" CASE 5: Wochentag$ = "Freitag" CASE 6: Wochentag$ = "Sonnabend" END SELECT Datum$ = Tag$ + Monat$ + Jahr$ REPLACE " " WITH "0" IN Datum$ END FUNCTION