|
DataMuseum.dkPresents historical artifacts from the history of: CP/M |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about CP/M Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 768 (0x300) Types: TextFile Names: »UPCASE.PAS«
└─⟦08ea08c61⟧ Bits:30003924 PolyPascal programmer └─ ⟦this⟧ »UPCASE.PAS« └─⟦09235ab48⟧ Bits:30003065 Demoprogrammer K-Z til Pascal bog └─ ⟦this⟧ »UPCASE.PAS« └─⟦092727b26⟧ Bits:30005927 Demoprogrammer til Pascal bog (Jet-80) └─ ⟦this⟧ »UPCASE.PAS«
PROGRAM upcase; TYPE str40 = STRING(.40.); VAR streng : str40; FUNCTION uppercase(str : str40) : str40; VAR i : INTEGER; s : str40; BEGIN (* uppercase *) s := ''; FOR i := 1 TO LEN(str) DO IF ('a' <= str(.i.)) AND (str(.i.) <= 'å') THEN s := s + CHR(ORD(str(.i.)) - 32) ELSE s := s + str(.i.); uppercase := s; END; (* uppercase *) BEGIN (* upcase *) WRITE(CLRHOM); REPEAT WRITE('Indtast en tekst (ingen tekst stopper): '); BUFLEN := 40; READLN(streng); WRITELN('''', streng, ''' kan også skrives: '); WRITELN(uppercase(streng)); WRITELN; UNTIL (streng = ''); END. (* upcase *) «eof»