|
|
DataMuseum.dkPresents historical artifacts from the history of: RegneCentralen RC759 "Piccoline" |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RegneCentralen RC759 "Piccoline" Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 1536 (0x600)
Types: TextFile
Names: »CRDPARSE.TXT«
└─⟦6a1b9f2c5⟧ Bits:30005310/disk3.imd Open Access II v2.10 (dansk)
└─⟦this⟧ »CRDPARSE.TXT«
! CRDPARSE
! parsed name looking for commas or blanks as delimeters
! p1 = where to begin looking for a comma or a blank, p2 = returns
! position of comma or blank, p3 = returns length of newfield,
! newfield returns parsed name, p1 returns start of next field
p2 = 0
p3 = 0
if p1 <= LENGTH(menufield)
! check for "," first
p2 = POS(",",menufield,p1)
IF p2 > 0
p3 = p2 - 1 ! length without comma
p4 = p1 + p2 - 1 ! position of comma
!found a comma parse name
newfield = EXTRACT(menufield,p1,p3)
newfield = trim(newfield)
!if next char after the comma is a blank - skip it
p4 = p4 + 1
IF P4 <= LENGTH(menufield)
IF EXTRACT(menufield,p4,1) = " "
p4 = p4 + 1
END IF
END IF
p1 = p4
ELSE
!if COMMA not found find a BLANK
p2 = POS(" ",menufield,p1)
IF p2 > 0
p3 = p2 - 1 ! length without blank
p4 = p1 + p2 - 1 ! position of blank
newfield = EXTRACT(menufield,p1,p3)
newfield = trim(newfield)
p1 = p4 + 1
ELSE
p4 = length(menufield) + 1
p3 = p4 - p1
newfield = EXTRACT(menufield,p1,p3)
newfield = trim(newfield)
p1 = p4
END IF
END IF
END IF
«eof»