2021-03-06 01:36:25 +02:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
< html >
< head >
< title > Explicit Actions< / title >
< link href = "../docs-assets/Breadcrumbs.css" rel = "stylesheet" rev = "stylesheet" type = "text/css" >
< meta name = "viewport" content = "width=device-width initial-scale=1" >
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" >
< meta http-equiv = "Content-Language" content = "en-gb" >
< link href = "../docs-assets/Contents.css" rel = "stylesheet" rev = "stylesheet" type = "text/css" >
< link href = "../docs-assets/Progress.css" rel = "stylesheet" rev = "stylesheet" type = "text/css" >
< link href = "../docs-assets/Navigation.css" rel = "stylesheet" rev = "stylesheet" type = "text/css" >
< link href = "../docs-assets/Fonts.css" rel = "stylesheet" rev = "stylesheet" type = "text/css" >
< link href = "../docs-assets/Base.css" rel = "stylesheet" rev = "stylesheet" type = "text/css" >
< script >
function togglePopup(material_id) {
var popup = document.getElementById(material_id);
popup.classList.toggle("show");
}
< / script >
< link href = "../docs-assets/Popups.css" rel = "stylesheet" rev = "stylesheet" type = "text/css" >
< link href = "../docs-assets/Colours.css" rel = "stylesheet" rev = "stylesheet" type = "text/css" >
< / head >
< body class = "commentary-font" >
< nav role = "navigation" >
2022-04-25 18:44:43 +03:00
< h1 > < a href = "../overview.html" >
2021-03-06 01:36:25 +02:00
< img src = "../docs-assets/Inform.png" height = 72" >
< / a > < / h1 >
2022-04-25 18:44:43 +03:00
< ul > < li > < a href = "../overview.html" > home< / a > < / li >
2022-04-04 20:31:44 +03:00
< / ul > < h2 > Compiler< / h2 > < ul >
< li > < a href = "../structure.html" > structure< / a > < / li >
< li > < a href = "../inbuildn.html" > inbuild< / a > < / li >
< li > < a href = "../inform7n.html" > inform7< / a > < / li >
< li > < a href = "../intern.html" > inter< / a > < / li >
< li > < a href = "../services.html" > services< / a > < / li >
2022-04-18 17:46:46 +03:00
< li > < a href = "../secrets.html" > secrets< / a > < / li >
2022-04-04 20:31:44 +03:00
< / ul > < h2 > Other Tools< / h2 > < ul >
< li > < a href = "../inblorbn.html" > inblorb< / a > < / li >
< li > < a href = "../indocn.html" > indoc< / a > < / li >
< li > < a href = "../inform6.html" > inform6< / a > < / li >
< li > < a href = "../inpolicyn.html" > inpolicy< / a > < / li >
< li > < a href = "../inrtpsn.html" > inrtps< / a > < / li >
2022-04-06 13:14:15 +03:00
< / ul > < h2 > Resources< / h2 > < ul >
< li > < a href = "../extensions.html" > extensions< / a > < / li >
< li > < a href = "../kits.html" > kits< / a > < / li >
2022-04-04 20:31:44 +03:00
< / ul > < h2 > Repository< / h2 > < ul >
< li > < a href = "https://github.com/ganelson/inform" > < img src = "../docs-assets/github.png" height = 18 > github< / a > < / li >
< / ul > < h2 > Related Projects< / h2 > < ul >
< li > < a href = "../../../inweb/docs/index.html" > inweb< / a > < / li >
< li > < a href = "../../../intest/docs/index.html" > intest< / a > < / li >
2021-03-06 01:36:25 +02:00
< / ul >
< / nav >
< main role = "main" >
<!-- Weave of 'Explicit Actions' generated by Inweb -->
< div class = "breadcrumbs" >
2022-04-25 18:44:43 +03:00
< ul class = "crumbs" > < li > < a href = "../overview.html" > Home< / a > < / li > < li > < a href = "../inform7n.html" > Inform7< / a > < / li > < li > < a href = "index.html" > if< / a > < / li > < li > < a href = "index.html#4" > Chapter 4: Actions< / a > < / li > < li > < b > Explicit Actions< / b > < / li > < / ul > < / div >
2021-03-06 01:36:25 +02:00
< p class = "purpose" > An exactly specified action is called "explicit".< / p >
< p class = "commentary firstcommentary" > < a id = "SP1" class = "paragraph-anchor" > < / a > < b > § 1. < / b > Explicit actions are used inside the compiler whenever we kmow exactly what
action we are talking about; stored action constants are < a href = "4-ea.html#SP1" class = "internal" > explicit_action< / a >
objects in a thin wrapper — see < a href = "4-ak.html" class = "internal" > Action Kinds< / a > .
< / p >
< pre class = "displayed-code all-displayed-code code-font" >
< span class = "reserved-syntax" > typedef< / span > < span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > struct< / span > < span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > explicit_action< / span > < span class = "plain-syntax" > {< / span >
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > int< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > request< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > struct< / span > < span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > action_name< / span > < span class = "plain-syntax" > *< / span > < span class = "identifier-syntax" > action< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > struct< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > parse_node< / span > < span class = "plain-syntax" > *< / span > < span class = "identifier-syntax" > actor< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > struct< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > parse_node< / span > < span class = "plain-syntax" > *< / span > < span class = "identifier-syntax" > first_noun< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > struct< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > parse_node< / span > < span class = "plain-syntax" > *< / span > < span class = "identifier-syntax" > second_noun< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > struct< / span > < span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > action_pattern< / span > < span class = "plain-syntax" > *< / span > < span class = "identifier-syntax" > as_described< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > } < / span > < span class = "reserved-syntax" > explicit_action< / span > < span class = "plain-syntax" > ;< / span >
< / pre >
2021-03-06 18:35:47 +02:00
< ul class = "endnotetexts" > < li > The structure explicit_action is accessed in 4/anaa, 4/ac and here.< / li > < / ul >
< p class = "commentary firstcommentary" > < a id = "SP2" class = "paragraph-anchor" > < / a > < b > § 2. < / b > The code here is concerned with the question: when is an action pattern a
description of an explicit action? The answer is only if takes the Goldilocks
position of being neither too specific, nor too unspecific:
< / p >
2021-03-06 01:36:25 +02:00
< pre class = "definitions code-font" > < span class = "definition-keyword" > define< / span > < span class = "constant-syntax" > UNDERSPECIFIC_EA_FAILURE< / span > < span class = "plain-syntax" > < / span > < span class = "constant-syntax" > 1< / span >
< span class = "definition-keyword" > define< / span > < span class = "constant-syntax" > OVERSPECIFIC_EA_FAILURE< / span > < span class = "plain-syntax" > < / span > < span class = "constant-syntax" > 2< / span >
< / pre >
< pre class = "displayed-code all-displayed-code code-font" >
2021-03-13 15:00:21 +02:00
< span class = "reserved-syntax" > explicit_action< / span > < span class = "plain-syntax" > *< / span > < span class = "function-syntax" > ExplicitActions::from_action_pattern< / span > < button class = "popup" onclick = "togglePopup('usagePopup1')" > < span class = "comment-syntax" > ?< / span > < span class = "popuptext" id = "usagePopup1" > Usage of < span class = "code-font" > < span class = "function-syntax" > ExplicitActions::from_action_pattern< / span > < / span > :< br / > Action Kinds - < a href = "4-ak.html#SP5" > § 5< / a > < / span > < / button > < span class = "plain-syntax" > (< / span > < span class = "reserved-syntax" > action_pattern< / span > < span class = "plain-syntax" > *< / span > < span class = "identifier-syntax" > ap< / span > < span class = "plain-syntax" > , < / span > < span class = "reserved-syntax" > int< / span > < span class = "plain-syntax" > *< / span > < span class = "identifier-syntax" > reason< / span > < span class = "plain-syntax" > ) {< / span >
2021-03-06 18:35:47 +02:00
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > if< / span > < span class = "plain-syntax" > (< / span > < a href = "4-ea.html#SP3" class = "function-link" > < span class = "function-syntax" > ExplicitActions::ap_underspecific< / span > < / a > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > ap< / span > < span class = "plain-syntax" > )) { *< / span > < span class = "identifier-syntax" > reason< / span > < span class = "plain-syntax" > = < / span > < span class = "constant-syntax" > UNDERSPECIFIC_EA_FAILURE< / span > < span class = "plain-syntax" > ; < / span > < span class = "reserved-syntax" > return< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > NULL< / span > < span class = "plain-syntax" > ; }< / span >
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > if< / span > < span class = "plain-syntax" > (< / span > < a href = "4-ea.html#SP4" class = "function-link" > < span class = "function-syntax" > ExplicitActions::ap_overspecific< / span > < / a > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > ap< / span > < span class = "plain-syntax" > )) { *< / span > < span class = "identifier-syntax" > reason< / span > < span class = "plain-syntax" > = < / span > < span class = "constant-syntax" > OVERSPECIFIC_EA_FAILURE< / span > < span class = "plain-syntax" > ; < / span > < span class = "reserved-syntax" > return< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > NULL< / span > < span class = "plain-syntax" > ; }< / span >
2021-03-06 01:36:25 +02:00
< span class = "plain-syntax" > *< / span > < span class = "identifier-syntax" > reason< / span > < span class = "plain-syntax" > = < / span > < span class = "constant-syntax" > 0< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > explicit_action< / span > < span class = "plain-syntax" > *< / span > < span class = "identifier-syntax" > ea< / span > < span class = "plain-syntax" > = < / span > < span class = "identifier-syntax" > CREATE< / span > < span class = "plain-syntax" > (< / span > < span class = "reserved-syntax" > explicit_action< / span > < span class = "plain-syntax" > );< / span >
2022-04-27 01:54:31 +03:00
< span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > ea< / span > < span class = "plain-syntax" > -> < / span > < span class = "element-syntax" > action< / span > < span class = "plain-syntax" > = < / span > < a href = "4-anl.html#SP24" class = "function-link" > < span class = "function-syntax" > ActionNameLists::get_the_one_true_action< / span > < / a > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > ap< / span > < span class = "plain-syntax" > -> < / span > < span class = "element-syntax" > action_list< / span > < span class = "plain-syntax" > );< / span >
2021-05-17 01:58:16 +03:00
< span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > ea< / span > < span class = "plain-syntax" > -> < / span > < span class = "element-syntax" > request< / span > < span class = "plain-syntax" > = < / span > < a href = "4-apc.html#SP13" class = "function-link" > < span class = "function-syntax" > APClauses::is_request< / span > < / a > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > ap< / span > < span class = "plain-syntax" > );< / span >
< span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > ea< / span > < span class = "plain-syntax" > -> < / span > < span class = "element-syntax" > actor< / span > < span class = "plain-syntax" > = < / span > < a href = "4-apc.html#SP7" class = "function-link" > < span class = "function-syntax" > APClauses::spec< / span > < / a > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > ap< / span > < span class = "plain-syntax" > , < / span > < span class = "constant-syntax" > ACTOR_AP_CLAUSE< / span > < span class = "plain-syntax" > );< / span >
< span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > ea< / span > < span class = "plain-syntax" > -> < / span > < span class = "element-syntax" > first_noun< / span > < span class = "plain-syntax" > = < / span > < a href = "4-apc.html#SP7" class = "function-link" > < span class = "function-syntax" > APClauses::spec< / span > < / a > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > ap< / span > < span class = "plain-syntax" > , < / span > < span class = "constant-syntax" > NOUN_AP_CLAUSE< / span > < span class = "plain-syntax" > );< / span >
< span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > ea< / span > < span class = "plain-syntax" > -> < / span > < span class = "element-syntax" > second_noun< / span > < span class = "plain-syntax" > = < / span > < a href = "4-apc.html#SP7" class = "function-link" > < span class = "function-syntax" > APClauses::spec< / span > < / a > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > ap< / span > < span class = "plain-syntax" > , < / span > < span class = "constant-syntax" > SECOND_AP_CLAUSE< / span > < span class = "plain-syntax" > );< / span >
2021-03-06 01:36:25 +02:00
< span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > ea< / span > < span class = "plain-syntax" > -> < / span > < span class = "element-syntax" > as_described< / span > < span class = "plain-syntax" > = < / span > < span class = "identifier-syntax" > ap< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > return< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > ea< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > }< / span >
2021-03-06 18:35:47 +02:00
< / pre >
< p class = "commentary firstcommentary" > < a id = "SP3" class = "paragraph-anchor" > < / a > < b > § 3. < / b > A pattern is underspecific if it fails to specify nouns required by the
action (example: "taking") or it does specify them, but too vaguely (example:
"taking a thing", or "an actor taking the medallion"):
< / p >
2021-03-06 01:36:25 +02:00
2021-03-06 18:35:47 +02:00
< pre class = "displayed-code all-displayed-code code-font" >
< span class = "reserved-syntax" > int< / span > < span class = "plain-syntax" > < / span > < span class = "function-syntax" > ExplicitActions::ap_underspecific< / span > < button class = "popup" onclick = "togglePopup('usagePopup2')" > < span class = "comment-syntax" > ?< / span > < span class = "popuptext" id = "usagePopup2" > Usage of < span class = "code-font" > < span class = "function-syntax" > ExplicitActions::ap_underspecific< / span > < / span > :< br / > < a href = "4-ea.html#SP2" > § 2< / a > < / span > < / button > < span class = "plain-syntax" > (< / span > < span class = "reserved-syntax" > action_pattern< / span > < span class = "plain-syntax" > *< / span > < span class = "identifier-syntax" > ap< / span > < span class = "plain-syntax" > ) {< / span >
2021-03-13 03:02:50 +02:00
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > action_name< / span > < span class = "plain-syntax" > *< / span > < span class = "identifier-syntax" > an< / span > < span class = "plain-syntax" > = < / span > < a href = "4-ap2.html#SP7" class = "function-link" > < span class = "function-syntax" > ActionPatterns::single_positive_action< / span > < / a > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > ap< / span > < span class = "plain-syntax" > );< / span >
2021-03-06 01:36:25 +02:00
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > if< / span > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > an< / span > < span class = "plain-syntax" > == < / span > < span class = "identifier-syntax" > NULL< / span > < span class = "plain-syntax" > ) < / span > < span class = "reserved-syntax" > return< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > TRUE< / span > < span class = "plain-syntax" > ;< / span >
2021-04-29 14:32:12 +03:00
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > if< / span > < span class = "plain-syntax" > ((< / span > < a href = "4-as.html#SP4" class = "function-link" > < span class = "function-syntax" > ActionSemantics::must_have_noun< / span > < / a > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > an< / span > < span class = "plain-syntax" > )) & & < / span >
2021-05-17 01:58:16 +03:00
< span class = "plain-syntax" > (< / span > < a href = "4-apc.html#SP7" class = "function-link" > < span class = "function-syntax" > APClauses::spec< / span > < / a > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > ap< / span > < span class = "plain-syntax" > , < / span > < span class = "constant-syntax" > NOUN_AP_CLAUSE< / span > < span class = "plain-syntax" > ) == < / span > < span class = "identifier-syntax" > NULL< / span > < span class = "plain-syntax" > )) < / span > < span class = "reserved-syntax" > return< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > TRUE< / span > < span class = "plain-syntax" > ;< / span >
2021-04-29 14:32:12 +03:00
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > if< / span > < span class = "plain-syntax" > ((< / span > < a href = "4-as.html#SP4" class = "function-link" > < span class = "function-syntax" > ActionSemantics::must_have_second< / span > < / a > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > an< / span > < span class = "plain-syntax" > )) & & < / span >
2021-05-17 01:58:16 +03:00
< span class = "plain-syntax" > (< / span > < a href = "4-apc.html#SP7" class = "function-link" > < span class = "function-syntax" > APClauses::spec< / span > < / a > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > ap< / span > < span class = "plain-syntax" > , < / span > < span class = "constant-syntax" > SECOND_AP_CLAUSE< / span > < span class = "plain-syntax" > ) == < / span > < span class = "identifier-syntax" > NULL< / span > < span class = "plain-syntax" > )) < / span > < span class = "reserved-syntax" > return< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > TRUE< / span > < span class = "plain-syntax" > ;< / span >
2021-04-29 14:32:12 +03:00
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > if< / span > < span class = "plain-syntax" > ((< / span > < a href = "4-as.html#SP4" class = "function-link" > < span class = "function-syntax" > ActionSemantics::can_have_noun< / span > < / a > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > an< / span > < span class = "plain-syntax" > )) & & < / span >
2021-03-06 18:35:47 +02:00
< span class = "plain-syntax" > (< / span > < a href = "4-ea.html#SP3" class = "function-link" > < span class = "function-syntax" > ExplicitActions::clause_unspecific< / span > < / a > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > ap< / span > < span class = "plain-syntax" > , < / span > < span class = "constant-syntax" > NOUN_AP_CLAUSE< / span > < span class = "plain-syntax" > ))) < / span > < span class = "reserved-syntax" > return< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > TRUE< / span > < span class = "plain-syntax" > ;< / span >
2021-04-29 14:32:12 +03:00
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > if< / span > < span class = "plain-syntax" > ((< / span > < a href = "4-as.html#SP4" class = "function-link" > < span class = "function-syntax" > ActionSemantics::can_have_second< / span > < / a > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > an< / span > < span class = "plain-syntax" > )) & & < / span >
2021-03-06 18:35:47 +02:00
< span class = "plain-syntax" > (< / span > < a href = "4-ea.html#SP3" class = "function-link" > < span class = "function-syntax" > ExplicitActions::clause_unspecific< / span > < / a > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > ap< / span > < span class = "plain-syntax" > , < / span > < span class = "constant-syntax" > SECOND_AP_CLAUSE< / span > < span class = "plain-syntax" > ))) < / span > < span class = "reserved-syntax" > return< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > TRUE< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > if< / span > < span class = "plain-syntax" > (< / span > < a href = "4-ea.html#SP3" class = "function-link" > < span class = "function-syntax" > ExplicitActions::clause_unspecific< / span > < / a > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > ap< / span > < span class = "plain-syntax" > , < / span > < span class = "constant-syntax" > ACTOR_AP_CLAUSE< / span > < span class = "plain-syntax" > )) < / span > < span class = "reserved-syntax" > return< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > TRUE< / span > < span class = "plain-syntax" > ;< / span >
2021-05-17 01:58:16 +03:00
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > if< / span > < span class = "plain-syntax" > (< / span > < a href = "4-apc.html#SP12" class = "function-link" > < span class = "function-syntax" > APClauses::actor_is_anyone_except_player< / span > < / a > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > ap< / span > < span class = "plain-syntax" > )) < / span > < span class = "reserved-syntax" > return< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > TRUE< / span > < span class = "plain-syntax" > ;< / span >
2021-03-06 01:36:25 +02:00
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > return< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > FALSE< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > }< / span >
< span class = "reserved-syntax" > int< / span > < span class = "plain-syntax" > < / span > < span class = "function-syntax" > ExplicitActions::clause_unspecific< / span > < span class = "plain-syntax" > (< / span > < span class = "reserved-syntax" > action_pattern< / span > < span class = "plain-syntax" > *< / span > < span class = "identifier-syntax" > ap< / span > < span class = "plain-syntax" > , < / span > < span class = "reserved-syntax" > int< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > C< / span > < span class = "plain-syntax" > ) {< / span >
2021-05-17 01:58:16 +03:00
< span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > parse_node< / span > < span class = "plain-syntax" > *< / span > < span class = "identifier-syntax" > spec< / span > < span class = "plain-syntax" > = < / span > < a href = "4-apc.html#SP7" class = "function-link" > < span class = "function-syntax" > APClauses::spec< / span > < / a > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > ap< / span > < span class = "plain-syntax" > , < / span > < span class = "identifier-syntax" > C< / span > < span class = "plain-syntax" > );< / span >
2021-03-06 01:36:25 +02:00
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > if< / span > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > spec< / span > < span class = "plain-syntax" > == < / span > < span class = "identifier-syntax" > NULL< / span > < span class = "plain-syntax" > ) < / span > < span class = "reserved-syntax" > return< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > FALSE< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > if< / span > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > Specifications::is_description< / span > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > spec< / span > < span class = "plain-syntax" > ) == < / span > < span class = "identifier-syntax" > FALSE< / span > < span class = "plain-syntax" > ) < / span > < span class = "reserved-syntax" > return< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > FALSE< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > return< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > TRUE< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > }< / span >
2021-03-06 18:35:47 +02:00
< / pre >
< p class = "commentary firstcommentary" > < a id = "SP4" class = "paragraph-anchor" > < / a > < b > § 4. < / b > A pattern is overspecific if it contains any extraneous clauses (example:
"taking the medallion in the presence of Matilda"), or refers to past times
(example: "taking the medallion for the third time"):
< / p >
2021-03-06 01:36:25 +02:00
2021-03-06 18:35:47 +02:00
< pre class = "displayed-code all-displayed-code code-font" >
2021-05-17 01:58:16 +03:00
< span class = "reserved-syntax" > int< / span > < span class = "plain-syntax" > < / span > < span class = "function-syntax" > ExplicitActions::ap_overspecific< / span > < button class = "popup" onclick = "togglePopup('usagePopup3')" > < span class = "comment-syntax" > ?< / span > < span class = "popuptext" id = "usagePopup3" > Usage of < span class = "code-font" > < span class = "function-syntax" > ExplicitActions::ap_overspecific< / span > < / span > :< br / > < a href = "4-ea.html#SP2" > § 2< / a > < br / > Action Pattern Clauses - < a href = "4-apc.html#SP18" > § 18< / a > < / span > < / button > < span class = "plain-syntax" > (< / span > < span class = "reserved-syntax" > action_pattern< / span > < span class = "plain-syntax" > *< / span > < span class = "identifier-syntax" > ap< / span > < span class = "plain-syntax" > ) {< / span >
2021-03-06 18:35:47 +02:00
< span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > LOOP_OVER_AP_CLAUSES< / span > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > apoc< / span > < span class = "plain-syntax" > , < / span > < span class = "identifier-syntax" > ap< / span > < span class = "plain-syntax" > )< / span >
2021-05-17 01:58:16 +03:00
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > if< / span > < span class = "plain-syntax" > ((< / span > < a href = "4-apc.html#SP15" class = "function-link" > < span class = "function-syntax" > APClauses::aspect< / span > < / a > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > apoc< / span > < span class = "plain-syntax" > ) != < / span > < span class = "constant-syntax" > PRIMARY_APCA< / span > < span class = "plain-syntax" > ) & & (< / span > < span class = "identifier-syntax" > apoc< / span > < span class = "plain-syntax" > -> < / span > < span class = "element-syntax" > clause_spec< / span > < span class = "plain-syntax" > ))< / span >
2021-03-06 01:36:25 +02:00
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > return< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > TRUE< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > if< / span > < span class = "plain-syntax" > (< / span > < span class = "identifier-syntax" > ap< / span > < span class = "plain-syntax" > -> < / span > < span class = "element-syntax" > duration< / span > < span class = "plain-syntax" > ) < / span > < span class = "reserved-syntax" > return< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > TRUE< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > < / span > < span class = "reserved-syntax" > return< / span > < span class = "plain-syntax" > < / span > < span class = "identifier-syntax" > FALSE< / span > < span class = "plain-syntax" > ;< / span >
< span class = "plain-syntax" > }< / span >
< / pre >
< nav role = "progress" > < div class = "progresscontainer" >
2021-03-30 00:53:01 +03:00
< ul class = "progressbar" > < li class = "progressprev" > < a href = "4-pc.html" > ❮ < / a > < / li > < li class = "progresschapter" > < a href = "P-wtmd.html" > P< / a > < / li > < li class = "progresschapter" > < a href = "1-im.html" > 1< / a > < / li > < li class = "progresschapter" > < a href = "2-bd.html" > 2< / a > < / li > < li class = "progresschapter" > < a href = "3-sm.html" > 3< / a > < / li > < li class = "progresscurrentchapter" > 4< / li > < li class = "progresssection" > < a href = "4-ap.html" > ap< / a > < / li > < li class = "progresssection" > < a href = "4-anaa.html" > anaa< / a > < / li > < li class = "progresssection" > < a href = "4-ak.html" > ak< / a > < / li > < li class = "progresssection" > < a href = "4-ac.html" > ac< / a > < / li > < li class = "progresssection" > < a href = "4-act.html" > act< / a > < / li > < li class = "progresssection" > < a href = "4-as.html" > as< / a > < / li > < li class = "progresssection" > < a href = "4-av.html" > av< / a > < / li > < li class = "progresssection" > < a href = "4-ann.html" > ann< / a > < / li > < li class = "progresssection" > < a href = "4-ap2.html" > ap2< / a > < / li > < li class = "progresssection" > < a href = "4-anl.html" > anl< / a > < / li > < li class = "progresssection" > < a href = "4-apc.html" > apc< / a > < / li > < li class = "progresssection" > < a href = "4-pap.html" > pap< / a > < / li > < li class = "progresssection" > < a href = "4-pc.html" > pc< / a > < / li > < li class = "progresscurrent" > ea< / li > < li class = "progresssection" > < a href = "4-nap.html" > nap< / a > < / li > < li class = "progresssection" > < a href = "4-gng.html" > gng< / a > < / li > < li class = "progresssection" > < a href = "4-rpoa.html" > rpoa< / a > < / li > < li class = "progresschapter" > < a href = "5-pp.html" > 5< / a > < / li > < li class = "progressnext" > < a href = "4-nap.html" > ❯ < / a > < / li > < / ul > < / div >
2021-03-06 01:36:25 +02:00
< / nav > <!-- End of weave -->
< / main >
< / body >
< / html >