[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [xri] Bug in pseudocode?
From: gwachob@gmail.com
[mailto:gwachob@gmail.com] On Behalf Of Gabe
Wachob Can't quite figure out the pseudocode here (in sec 13.6): [=Drummond] Gabe, good catch –
nobody noticed that since we added section 7 right at the end of the CD02
cycle, we needed to update all the section references in the pseudocode (they
are hand-coded references and not bookmarks). Below is an update to the pseudocode text
with all the references updated. RE the Present.x and nodefault_x
references you cite above, the “x” just stands for “Type,
Path, or Mediatype” as was defined above – nobody thought we needed
to redefine it. Maybe we need to take that definition out of the previous FOR
loop and put it at the very start so it’s clear it’s a global
definition? We just used “x” because it made the code much more
compact than calling out three separate loops, one for Type, one for Path, and
one for Mediatype. I’m wide open to your suggestions
for how best to improve this. =Drummond FOR EACH SEP CREATE set of SEL
match flags SET all flags to
FALSE FOR EACH SEL of
category x (where x=Type, Path, or Mediatype) SET
Present.x=TRUE IF match on
this SEL is POSITIVE IF
select="true" ;see 13.4.2 ADD
SEP TO SELECTED SET NEXT
SEP ELSE SET
Positive.x=TRUE ENDIF ELSEIF match
on this SEL is DEFAULT ;see 13.3.2 IF
Positive.x != TRUE AND nodefault
!= x ;see 13.3.5 SET
Default.x=TRUE ENDIF ENDIF ENDFOR IF Present.x=FALSE ;see
13.3.3 IF nodefault_x
!= TRUE ;see 13.3.2 SET
Default.x=TRUE ENDIF ENDIF IF Positive.Type=TRUE
AND Positive.Path=TRUE
AND
Positive.Mediatype=TRUE ;see 13.4.3 ADD SEP TO
SELECTED SET NEXT SEP ELSEIF SELECTED SET
!= EMPTY ;see 13.5.1 NEXT SEP ELSEIF
(Positive.Type=TRUE OR Default.Type=TRUE) AND
(Positive.Path=TRUE OR Default.Path=TRUE) AND
(Positive.MediaType=TRUE OR Default.MediaType=TRUE) ADD SEP TO
DEFAULT SET ;see 13.4.4 ENDIF ENDFOR IF SELECTED SET = EMPTY ;see
13.5.1 FOR EACH SEP IN
DEFAULT SET ;see 13.5.2 IF
(Positive.Type=TRUE AND Positive.Path=TRUE) OR (Positive.Type=TRUE
AND Positive.MediaType=TRUE) OR (Positive.Path=TRUE
AND Positive.MediaType=TRUE) ADD SEP
TO SELECTED SET ENDIF ENDFOR IF SELECTED SET =
EMPTY FOR EACH SEP
IN DEFAULT SET ;see 13.5.2 IF
Positive.Type=TRUE OR Positive.Path=TRUE
OR Positive.MediaType=TRUE ADD
SEP TO SELECTED SET ENDIF ENDFOR ENDIF ENDIF IF SELECTED SET !=
EMPTY RETURN SELECTED SET ELSE RETURN DEFAULT SET ENDIF |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]