|
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: 4224 (0x1080) Names: »IDEAL.PAS«
└─⟦f983c2ef3⟧ Bits:30004681 Pascal opgaver (Butler) └─⟦this⟧ »IDEAL.PAS«
0x0000…0020 (0,) 72 66 69 6c 20 3a 20 72 65 67 69 73 74 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 63 70 ┆rfil : register; cp┆ 0x0020…0040 6d 6e 61 76 6e 20 3a 20 53 54 52 49 4e 47 28 2e 31 34 2e 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 ┆mnavn : STRING(.14.); ┆ 0x0040…0060 20 20 20 0d 0a 20 20 20 20 20 20 20 20 20 20 42 45 47 49 4e 0d 0a 20 20 20 20 20 20 20 20 20 20 ┆ BEGIN ┆ 0x0060…0080 20 20 57 52 49 54 45 28 43 48 52 28 31 32 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 57 ┆ WRITE(CHR(12)); W┆ 0x0080…00a0 52 49 54 45 28 27 48 76 61 64 20 68 65 64 64 65 72 20 6b 61 72 74 6f 74 65 6b 65 74 20 28 43 50 ┆RITE('Hvad hedder kartoteket (CP┆ 0x00a0…00c0 2f 4d 20 6e 61 76 6e 29 3a 20 27 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 45 41 44 4c ┆/M navn): '); READL┆ 0x00c0…00e0 4e 28 63 70 6d 6e 61 76 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 53 53 49 47 4e 28 ┆N(cpmnavn); ASSIGN(┆ 0x00e0…0100 72 65 67 69 73 74 65 72 66 69 6c 2c 20 63 70 6d 6e 61 76 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 ┆registerfil, cpmnavn); ┆ 0x0100…0120 20 20 20 20 52 45 53 45 54 28 72 65 67 69 73 74 65 72 66 69 6c 29 3b 0d 0a 20 20 20 20 20 20 20 ┆ RESET(registerfil); ┆ 0x0120…0140 20 20 20 20 20 57 48 49 4c 45 20 4e 4f 54 20 45 4f 46 28 72 65 67 69 73 74 65 72 66 69 6c 29 20 ┆ WHILE NOT EOF(registerfil) ┆ 0x0140…0160 44 4f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 42 45 47 49 4e 0d 0a 20 20 20 20 20 20 20 ┆DO BEGIN ┆ 0x0160…0180 20 20 20 20 20 20 20 20 20 52 45 41 44 28 72 65 67 69 73 74 65 72 66 69 6c 2c 20 6d 65 64 6c 65 ┆ READ(registerfil, medle┆ 0x0180…01a0 6d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 57 49 54 48 20 6d 65 64 6c 65 6d ┆m); WITH medlem┆ 0x01a0…01c0 20 44 4f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 42 45 47 49 4e 0d 0a 20 20 ┆ DO BEGIN ┆ 0x01c0…01e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 57 52 49 54 45 4c 4e 3b 0d 0a 20 20 20 20 ┆ WRITELN; ┆ 0x01e0…0200 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 57 52 49 54 45 4c 4e 28 27 4d 65 64 6c 65 6d 73 ┆ WRITELN('Medlems┆ 0x0200…0220 (1,) 6e 75 6d 6d 65 72 3a 20 27 2c 20 6c 6f 65 62 65 6e 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 ┆nummer: ', loebenr); ┆ 0x0220…0240 20 20 20 20 20 20 20 20 20 20 57 52 49 54 45 4c 4e 28 27 4e 61 76 6e 3a 20 27 2c 20 6e 61 76 6e ┆ WRITELN('Navn: ', navn┆ 0x0240…0260 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 57 52 49 54 45 4c 4e 28 ┆); WRITELN(┆ 0x0260…0280 27 47 61 64 65 20 6f 67 20 6e 72 3a 20 27 2c 20 67 61 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 ┆'Gade og nr: ', gade); ┆ 0x0280…02a0 20 20 20 20 20 20 20 20 20 20 20 20 57 52 49 54 45 4c 4e 28 27 50 6f 73 74 6e 72 2e 20 6f 67 20 ┆ WRITELN('Postnr. og ┆ 0x02a0…02c0 62 79 3a 20 27 2c 20 70 6f 73 74 6e 72 62 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ┆by: ', postnrby); ┆ 0x02c0…02e0 20 20 20 20 20 20 20 57 52 49 54 45 4c 4e 28 27 4f 70 6c 79 73 6e 69 6e 67 65 72 3a 20 27 2c 20 ┆ WRITELN('Oplysninger: ', ┆ 0x02e0…0300 69 6e 66 6f 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 4e 44 3b 0d 0a ┆info); END; ┆ 0x0300…0320 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 4e 44 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ┆ END; ┆ 0x0320…0340 43 4c 4f 53 45 28 72 65 67 69 73 74 65 72 66 69 6c 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 45 ┆CLOSE(registerfil); E┆ 0x0340…0360 4e 44 2e 0d 0a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a ┆ND. ┆ 0x0360…0380 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a ┆ ┆ 0x0380…03a0 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 ┆ ┆ […0x3…] 0x0400…0420 (2,) 20 20 20 20 4b 20 56 20 49 20 4e 20 44 20 45 20 52 20 20 26 20 20 4d 20 5b 20 4e 20 44 20 20 20 ┆ K V I N D E R & M Æ N D ┆ 0x0420…0440 20 20 20 20 20 20 20 20 20 2a 2a 2a 2a 27 29 3b 0d 0a 20 20 20 20 20 20 47 4f 54 4f 58 59 28 78 ┆ ****'); GOTOXY(x┆ 0x0440…0460 2c 20 79 20 2b 20 38 29 3b 0d 0a 20 20 20 20 20 20 57 52 49 54 45 28 27 2a 2a 2a 2a 20 20 20 20 ┆, y + 8); WRITE('**** ┆ 0x0460…0480 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ┆ ┆ 0x0480…04a0 20 20 20 20 20 20 20 20 20 20 20 20 20 2a 2a 2a 2a 27 29 3b 0d 0a 20 20 20 20 20 20 47 4f 54 4f ┆ ****'); GOTO┆ 0x04a0…04c0 58 59 28 78 2c 20 79 20 2b 20 39 29 3b 0d 0a 20 20 20 20 20 20 57 52 49 54 45 28 27 2a 2a 2a 2a ┆XY(x, y + 9); WRITE('****┆ 0x04c0…04e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ┆ ┆ 0x04e0…0500 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2a 2a 2a 2a 27 29 3b 0d 0a 20 20 20 20 20 20 ┆ ****'); ┆ 0x0500…0520 47 4f 54 4f 58 59 28 78 2c 20 79 20 2b 20 31 30 29 3b 0d 0a 20 20 20 20 20 20 57 52 49 54 45 28 ┆GOTOXY(x, y + 10); WRITE(┆ 0x0520…0540 27 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ┆'*******************************┆ 0x0540…0560 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 27 29 3b 0d 0a 20 ┆**************************'); ┆ 0x0560…0580 20 20 20 20 20 47 4f 54 4f 58 59 28 78 2c 20 32 30 29 3b 0d 0a 20 20 20 20 20 20 57 52 49 54 45 ┆ GOTOXY(x, 20); WRITE┆ 0x0580…05a0 28 27 50 72 6f 67 72 61 6d 6d 65 74 20 75 64 73 6b 72 69 76 65 72 20 69 64 65 61 6c 76 7b 67 74 ┆('Programmet udskriver idealvægt┆ 0x05a0…05c0 65 6e 20 68 6f 73 20 6b 76 69 6e 64 65 72 20 6f 67 20 6d 7b 6e 64 2c 20 6e 7d 72 27 29 3b 0d 0a ┆en hos kvinder og mænd, når'); ┆ 0x05c0…05e0 20 20 20 20 20 20 47 4f 54 4f 58 59 28 78 2c 20 32 31 29 3b 0d 0a 20 20 20 20 20 20 57 52 49 54 ┆ GOTOXY(x, 21); WRIT┆ 0x05e0…0600 45 28 27 6d 61 6e 20 69 6e 64 74 61 73 74 65 72 20 68 7c 6a 64 65 6e 20 69 20 63 6d 2e 27 29 3b ┆E('man indtaster højden i cm.');┆ 0x0600…0620 (3,) 0d 0a 20 20 20 20 20 20 47 4f 54 4f 58 59 28 36 35 2c 20 32 32 29 3b 0d 0a 20 20 20 20 20 20 57 ┆ GOTOXY(65, 22); W┆ 0x0620…0640 52 49 54 45 28 27 54 61 73 74 20 3c 52 45 54 55 52 4e 3e 21 27 29 3b 0d 0a 20 20 20 20 20 20 52 ┆RITE('Tast <RETURN>!'); R┆ 0x0640…0660 45 50 45 41 54 0d 0a 20 20 20 20 20 20 20 20 52 45 41 44 28 4b 42 44 2c 20 63 68 29 3b 0d 0a 20 ┆EPEAT READ(KBD, ch); ┆ 0x0660…0680 20 20 20 20 20 55 4e 54 49 4c 20 63 68 20 3d 20 43 48 52 28 31 33 29 3b 0d 0a 20 20 20 20 45 4e ┆ UNTIL ch = CHR(13); EN┆ 0x0680…06a0 44 3b 20 28 2a 20 66 6f 72 73 69 64 65 20 2a 29 0d 0a 20 20 0d 0a 20 20 50 52 4f 43 45 44 55 52 ┆D; (* forside *) PROCEDUR┆ 0x06a0…06c0 45 20 75 64 73 6b 72 69 66 74 28 6b 6f 65 6e 20 3a 20 73 74 72 36 3b 20 68 6f 65 6a 64 65 20 3a ┆E udskrift(koen : str6; hoejde :┆ 0x06c0…06e0 20 49 4e 54 45 47 45 52 29 3b 0d 0a 20 20 0d 0a 20 20 20 20 50 52 4f 43 45 44 55 52 45 20 75 6e ┆ INTEGER); PROCEDURE un┆ 0x06e0…0700 6f 72 6d 61 6c 3b 0d 0a 20 20 0d 0a 20 20 20 20 20 20 42 45 47 49 4e 20 28 2a 20 75 6e 6f 72 6d ┆ormal; BEGIN (* unorm┆ 0x0700…0720 61 6c 20 2a 29 0d 0a 20 20 20 20 20 20 20 20 57 52 49 54 45 28 43 4c 52 48 4f 4d 29 3b 0d 0a 20 ┆al *) WRITE(CLRHOM); ┆ 0x0720…0740 20 20 20 20 20 20 20 47 4f 54 4f 58 59 28 35 2c 20 39 29 3b 0d 0a 20 20 20 20 20 20 20 20 57 52 ┆ GOTOXY(5, 9); WR┆ 0x0740…0760 49 54 45 28 27 44 75 20 6c 69 67 67 65 72 20 75 64 65 6e 20 66 6f 72 20 64 65 20 6e 6f 72 6d 61 ┆ITE('Du ligger uden for de norma┆ 0x0760…0780 6c 65 20 72 61 6d 6d 65 72 2e 20 50 72 7c 76 20 69 67 65 6e 21 27 29 3b 0d 0a 20 20 20 20 20 20 ┆le rammer. Prøv igen!'); ┆ 0x0780…07a0 45 4e 44 3b 20 28 2a 20 75 6e 6f 72 6d 61 6c 20 2a 29 0d 0a 20 20 20 20 0d 0a 20 20 20 20 50 52 ┆END; (* unormal *) PR┆ 0x07a0…07c0 4f 43 45 44 55 52 45 20 75 64 3b 0d 0a 20 20 20 20 0d 0a 20 20 20 20 20 20 56 41 52 0d 0a 20 20 ┆OCEDURE ud; VAR ┆ 0x07c0…07e0 20 20 20 20 20 20 76 61 65 67 74 20 3a 20 52 45 41 4c 3b 0d 0a 20 20 20 20 20 20 20 20 0d 0a 20 ┆ vaegt : REAL; ┆ 0x07e0…0800 20 20 20 20 20 42 45 47 49 4e 20 28 2a 20 75 64 20 2a 29 0d 0a 20 20 20 20 20 20 20 20 49 46 20 ┆ BEGIN (* ud *) IF ┆ 0x0800…0820 (4,) 6b 6f 65 6e 20 3d 20 27 6d 61 6e 64 27 0d 0a 20 20 20 20 20 20 20 20 20 20 54 48 45 4e 20 76 61 ┆koen = 'mand' THEN va┆ 0x0820…0840 65 67 74 20 3a 3d 20 28 68 6f 65 6a 64 65 20 2d 20 31 30 30 29 20 2a 20 30 2e 39 30 0d 0a 20 20 ┆egt := (hoejde - 100) * 0.90 ┆ 0x0840…0860 20 20 20 20 20 20 20 20 45 4c 53 45 20 76 61 65 67 74 20 3a 3d 20 28 68 6f 65 6a 64 65 20 2d 20 ┆ ELSE vaegt := (hoejde - ┆ 0x0860…0880 31 30 30 29 20 2a 20 30 2e 38 38 3b 0d 0a 20 20 20 20 20 20 20 20 47 4f 54 4f 58 59 28 30 2c 20 ┆100) * 0.88; GOTOXY(0, ┆ 0x0880…08a0 39 29 3b 0d 0a 20 20 20 20 20 20 20 20 57 52 49 54 45 4c 4e 28 27 20 20 20 20 20 2a 2a 2a 2a 2a ┆9); WRITELN(' *****┆ 0x08a0…08c0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ┆********************************┆ 0x08c0…08e0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 27 29 3b 0d 0a 20 20 20 20 20 20 20 20 57 52 49 ┆****************'); WRI┆ 0x08e0…0900 54 45 4c 4e 28 27 20 20 20 20 20 2a 2a 2a 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ┆TELN(' **** ┆ 0x0900…0920 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2a 2a 2a 2a ┆ ****┆ 0x0920…0940 27 29 3b 0d 0a 20 20 20 20 20 20 20 20 57 52 49 54 45 4c 4e 28 27 20 20 20 20 20 2a 2a 2a 2a 20 ┆'); WRITELN(' **** ┆ 0x0940…0960 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ┆ ┆ 0x0960…0980 20 20 20 20 20 20 20 20 20 20 20 20 2a 2a 2a 2a 27 29 3b 0d 0a 20 20 20 20 20 20 20 20 57 52 49 ┆ ****'); WRI┆ 0x0980…09a0 54 45 4c 4e 28 27 20 20 20 20 20 2a 2a 2a 2a 20 20 20 20 20 20 20 44 75 20 73 6b 61 6c 20 6d 65 ┆TELN(' **** Du skal me┆ 0x09a0…09c0 64 20 65 6e 20 68 7c 6a 64 65 20 70 7d 20 27 2c 20 68 6f 65 6a 64 65 2c 20 27 20 63 6d 2e 27 2c ┆d en højde på ', hoejde, ' cm.',┆ 0x09c0…09e0 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 27 20 20 20 20 20 20 20 2a 2a 2a 2a 27 ┆ ' ****'┆ 0x09e0…0a00 29 3b 0d 0a 20 20 20 20 20 20 20 20 57 52 49 54 45 4c 4e 28 27 20 20 20 20 20 2a 2a 2a 2a 20 20 ┆); WRITELN(' **** ┆ 0x0a00…0a20 (5,) 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ┆ ┆ 0x0a20…0a40 20 20 20 20 20 20 20 20 20 20 20 2a 2a 2a 2a 27 29 3b 0d 0a 20 20 20 20 20 20 20 20 57 52 49 54 ┆ ****'); WRIT┆ 0x0a40…0a60 45 4c 4e 28 27 20 20 20 20 20 2a 2a 2a 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 ┆ELN(' **** v┆ 0x0a60…0a80 65 6a 65 20 27 2c 20 52 4f 55 4e 44 28 76 61 65 67 74 29 2c 20 27 20 6b 67 2e 27 2c 0d 0a 20 20 ┆eje ', ROUND(vaegt), ' kg.', ┆ 0x0a80…0aa0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 27 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ┆ ' ┆ 0x0aa0…0ac0 2a 2a 2a 2a 27 29 3b 0d 0a 20 20 20 20 20 20 20 20 57 52 49 54 45 4c 4e 28 27 20 20 20 20 20 2a ┆****'); WRITELN(' *┆ 0x0ac0…0ae0 2a 2a 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ┆*** ┆ 0x0ae0…0b00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2a 2a 2a 2a 27 29 3b 0d 0a 20 20 20 20 20 20 20 ┆ ****'); ┆ 0x0b00…0b20 20 57 52 49 54 45 4c 4e 28 27 20 20 20 20 20 2a 2a 2a 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 ┆ WRITELN(' **** ┆ 0x0b20…0b40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ┆ ┆ 0x0b40…0b60 2a 2a 2a 2a 27 29 3b 0d 0a 20 20 20 20 20 20 20 20 57 52 49 54 45 4c 4e 28 27 20 20 20 20 20 2a ┆****'); WRITELN(' *┆ 0x0b60…0b80 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ┆********************************┆ 0x0b80…0ba0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 27 29 3b 0d 0a 20 20 20 20 20 45 4e ┆********************'); EN┆ 0x0ba0…0bc0 44 3b 20 28 2a 20 75 64 20 2a 29 0d 0a 20 20 0d 0a 20 20 20 20 42 45 47 49 4e 20 28 2a 20 75 64 ┆D; (* ud *) BEGIN (* ud┆ 0x0bc0…0be0 73 6b 72 69 66 74 20 2a 29 0d 0a 20 20 20 20 20 20 49 46 20 28 68 6f 65 6a 64 65 20 3c 20 31 34 ┆skrift *) IF (hoejde < 14┆ 0x0be0…0c00 30 29 20 4f 52 20 28 32 30 30 20 3c 20 68 6f 65 6a 64 65 29 0d 0a 20 20 20 20 20 20 20 20 54 48 ┆0) OR (200 < hoejde) TH┆ 0x0c00…0c20 (6,) e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 e5 ┆ ┆ […0x23…]