÷ƒ’À;è TeX output 1999.03.24:1011‹ÿÿÿÿ y� ý£ ?� þ�‘dhVóDÓítG®G®cmr17¹The–7tL�Ÿüdú�‘úKGóX«Q cmr12ºAŽŽ‘¹”¹T�‘ý[™Ÿ¸-EŽ‘;gX3“Programming“Language|ŽŸ�‘Dpša–7tprop�sŽosed“system“for“T�‘ý[™Ÿ¸-EŽ‘;gX“macro“programmingŽŸ���������’�,ž£hºcŽŽŽ��’Œ£›ó!",š cmsy10¾ ŽŽŽ’œŽEºDaš¬rvid–ê¨Carlisle,“Chris“Ro˜wley“andŽŽ¤��’½Þ²F‘ÿVrank‘ê¨Mittelbac�¬rhŽŽ¡��’ij„L�ŸýDD�‘ûÅ"ó|{Ycmr8¿AŽŽ�_ÙºT�‘þ ‘Ÿ•UEŽ‘‘!X3‘ê¨pro‘§jectŽŽ¡��’�ödó߆µT cmtt12Ålatex-l@urz.uni-heidelberg.deŽŽŽŽŽŸAˆ‹�’ÃkºMarc�¬rh–ê¨24,“1999ŽŸ$�’Ö!Kót ‰: cmbx9ÇAbstractŽŸ¬Ñ�‘dßüóo´‹Ç cmr9ÆThis–KVpap�AÇer“givš¾9es“s“brief“in˜tro�AÇduction“to“a“new“set“of“programmingޤ �‘Wcon•¾9v“en“tions–r–that“ha•¾9v“e–r–b�AÇeen“designed“to“meet“the“requiremen�¾9ts“of“imple-Ž¡�‘Wmenš¾9ting–Tlarge“scale“T�‘þuAŸïÿEŽ‘˜ŸX“macro“programming“pro‘ƒŽjects“suc˜h“as“L�Ÿýó5�‘ü«‡ó¹Aa¨cmr6ÀAŽŽ‘© ÆT�‘þuAŸïÿEŽ‘˜ŸX.Ž¡�‘dßüThe–Tmain“features“of“the“system“describ�AÇed“are:Ž©����‘c`ó©±�Ê cmsy9ÉŽŽŽ‘mÆclassi cation–á[of“the“macros“(or,›]in“L�Ÿýó5�‘ü«‡ÀAŽŽ‘© ÆT�‘þuAŸïÿEŽ‘˜ŸX“terminology‘ÿ:«,˜commands)Ž¡�‘min�¾9to–‚ªL�Ÿýó5�‘ü«‡ÀAŽŽ›© ÆT�‘þuAŸïÿEŽ‘˜ŸX“functions“and“L�Ÿýó5�‘ü«‡ÀAŽŽ˜ÆT�‘þuAŸïÿEŽ‘˜ŸX“parameters,‘�ÿand“also“in�¾9to“mo�AÇdulesŽ¡�‘mcon�¾9taining–Trelated“commands;ަ����‘c`ÉŽŽŽ‘mÆa–Tsystematic“naming“sc�¾9heme“based“on“these“classi cations;ަ����‘c`ÉŽŽŽ‘mÆa–pRsimple“mecš¾9hanism“for“con˜trolling“the“expansion“of“a“function'sŽ¡�‘margumen�¾9ts.ަ�‘WA‘o®system–oÆsuc�¾9h“as“this“is“bšAÇeing“used“exp˜erimen�¾9tally“as“the“basis“for“T�‘þuAŸïÿEŽ‘˜ŸXŽ¡�‘Wprogramming–¬[within“the“L�Ÿýó5�‘ü«‡ÀAŽŽ‘© ÆT�‘þuAŸïÿEŽ‘˜ŸX3“pro‘ƒŽject.‘á†Note“that“the“language“is“notŽ¡�‘Winš¾9tended–Tfor“either“do�AÇcumen˜t“mark-up“or“st˜yle“sp�AÇeci cation.Ž¡�‘dßüThis–‹Òpap�AÇer“is“based“on“a“talk“givš¾9en“b˜y“Da˜vid“Carlisle“in“San“F‘ÿ:«rancisco,Ž¡�‘WJuly–Uá1997,‘fbut“it“describ�AÇes“the“wš¾9ork“of“sev˜eral“p�AÇeople:‘�‰principally“F‘ÿ:«rankŽ¡�‘WMittelbacš¾9h–ëÄand“Den˜ys“Duc˜hier,›!`together“with“Johannes“Braams,˜Da�¾9vidŽ¡�‘WCarlisle,›GMic•¾9hael‘þÄDo“wnes,˜Alan–þÄJe rey‘ÿ:«,˜Chris“Roš¾9wley“and“Rainer“Sc˜h‘û`opf.ŽŸ+Ä��‘>ó ÂÖN ff cmbx12Ë1Ž‘VLËIn�ŒÌtro�s3ductionŽŸç�‘>óKñ`y cmr10²This–èpapšGer“describ˜es“the“con•¸ãv“en“tions–èfor“a“T�‘þU>Ÿ'EŽ‘ãxX-based“programming“languageޤ �‘>whicš¸ãh–Þ5is“in˜tended“to“pro˜vide“a“more“consisten˜t“and“rational“en˜vironmen˜t“for“theŽ¡�‘>construction–UUof“large“scale“systems,“suc�¸ãh“as“L�Ÿýó5�‘üffóÙ“ Rcmr7±AŽŽ‘͉²T�‘þU>Ÿ'EŽ›ãxX,“using“T�‘þU>Ÿ'EŽ˜X“macros.Ž¡�‘MV‘ÿ*ªarianš¸ãts–vof“this“language“ha˜v˜e“b�Geen“in“use“b˜y“The“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX3“Pro‘Ž8ject“T‘ÿ*ªeamŽ¡�‘>since–ßýaround“1990“but“the“syn�¸ãtax“spšGeci cation“to“b˜e“outlined“here“should“ó!ý': cmti10ÌnotŽ¡�‘>²bšGe–} considered“ nal.‘èãThis“is“an“exp˜erimenš¸ãtal“language“th˜us“man˜y“asp�Gects,‘†ösuc˜hŽŽŸ�’è1ŽŽŒ‹* y� ý£ ?� ýä�‘>²as–Êcthe“synš¸ãtax“con˜v˜en˜tions“and“naming“sc˜hemes,‘æ-ma˜y“(and“probably“will)“c˜hangeޤ �‘>as–UUmore“exp�Gerience“is“gained“with“using“the“language“in“practice.Ž¡�‘MThe–fÉnext“section“shoš¸ãws“where“this“language“ ts“in˜to“a“complete“T�‘þU>Ÿ'EŽ‘ãxX-basedŽ¡�‘>do•Gcumen�¸ãt›¨wpro“cessing˜system.‘k.W‘ÿ*ªe˜then˜describ“e˜the˜ma‘Ž8jor˜features˜of˜the˜syn-Ž¡�‘>tactic–Š|structure“of“command“names,‘³including“the“argumenš¸ãt“sp�Geci cation“syn˜taxŽ¡�‘>used–UUin“function“names.Ž¡�‘MThe–þpractical“ideas“b�Gehind“this“argumenš¸ãt“syn˜tax“will“b�Ge“explained,‘'vtogetherŽ¡�‘>with–”¬the“semanš¸ãtics“of“the“expansion“con˜trol“mec˜hanism“and“the“in˜terface“usedŽ¡�‘>to–_·de ne“v›ÿqÇarian�¸ãt“forms“of“functions.‘�ìThe“pap�Ger“also“discusses“some“adv˜an�¸ãtagesŽ¡�‘>of–UUthe“syn�¸ãtax“for“parameter“names.Ž¡�‘MAs–ÝRwš¸ãe“shall“demonstrate,‘õSthe“use“of“a“structured“naming“sc˜heme“and“of“v‘ÿqÇari-Ž¡�‘>anš¸ãt–•éforms“for“functions“greatly“impro˜v˜es“the“readabilit˜y“of“the“co�Gde“and“henceŽ¡�‘>also–ûìits“reliabilit•¸ãy‘ÿ*ª.‘e�Moreo“v“er,‘%’exp�Gerience–ûìhas“sho�¸ãwn“that“the“longer“commandŽ¡�‘>names–O£whicš¸ãh“result“from“the“new“syn˜tax“do“not“mak˜e“the“pro�Gcess“of“ÌwritingŽ¡�‘>²cošGde–ísigni can�¸ãtly“harder“(esp˜ecially“when“using“a“reasonably“in•¸ãtelligen“t‘íeditor).Ž¡�‘MThe–Î6 nal“section“giv�¸ães“some“details“of“our“plans“to“distribute“parts“of“thisŽ¡�‘>system–_¶during“the“next“yš¸ãear.‘�ëMore“general“information“concerning“the“w˜ork“ofŽ¡�‘>the–UUL�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX3“Pro‘Ž8ject“can“b�Ge“found“in“[�4Ž‘].ŽŸ!Ä��‘>Ë2Ž‘VLËLanguages–ffand“in�ŒÌterfacesŽŸç�‘>²It–‹×is“p�Gossible“to“idenš¸ãtify“sev˜eral“distinct“languages“related“to“the“v‘ÿqÇarious“in˜ter-Ž¡�‘>faces–ÚÕthat“are“needed“in“a“T�‘þU>Ÿ'EŽ‘ãxX-based“došGcumen�¸ãt“pro˜cessing“system.‘HòThis“sectionŽ¡�‘>lošGoks–UUat“those“w�¸ãe“consider“most“imp˜ortan�¸ãt“for“the“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX3“system.ŽŸ���‘>ó"ò"V cmbx10ÍDo�QÇcumen�®9t‘ÕTmark-upŽŽ’¥53²This–Üôcomprises“those“commands“(often“called“tags)“thatŽ¡�‘Ware–UUto“em�¸ãbšGedded“in“the“do˜cumen�¸ãt“(the“ó#ßêŸ'EŽ‘ãxX-based“mark-up“suc˜h“as�“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX‘ü2�Ÿÿó  b> cmmi10µ"ŽŽ‘(ð�²,‘®Úas“describ�GedŽ¡�‘Win–UU[�3Ž›]“and“[�2Ž˜],“or“a“mark-up“language“de ned“via“ó$Œ-ø cmcsc10Ïsgml“²or“Ïxml².ަ�‘WOne–problem“with“more“traditional“T�‘þU>Ÿ'EŽ‘ãxX“cošGding“con•¸ãv“en“tions–(as“describ˜edŽ¡�‘Win–ÑÅ[�1Ž‘])“is“that“the“names“and“synš¸ãtax“of“T�‘þU>Ÿ'EŽ‘ãxX's“primitiv˜e“formatting“com-Ž¡�‘Wmands–G¾are“ingeniously“designed“to“b�Ge“`natural'“when“used“directly“b�¸ãy“theŽ¡�‘Wauthor–§+as“do�Gcumenš¸ãt“mark-up“or“in“macros.‘gIIronically‘ÿ*ª,‘» the“ubiquit˜y“(andŽ¡�‘Wwidely–recognised“sup�Gerioritš¸ãy)“of“logical“mark-up“has“mean˜t“that“suc˜h“ex-Ž¡�‘Wplicit–¸ßformatting“commands“are“almost“nevš¸ãer“needed“in“do�Gcumen˜ts“or“inŽ¡�‘Wauthor-de ned–|òmacros.‘)¦Thš¸ãus“they“are“used“almost“exclusiv˜ely“b˜y“T�‘þU>Ÿ'EŽ‘ãxX“pro-Ž¡�‘Wgrammers–Ùóto“de ne“higher-levš¸ãel“commands;‘and“their“idiosyncratic“syn˜taxŽ¡�‘Wis–jÇnot“at“all“p�Gopular“with“this“comm•¸ãunit“y‘ÿ*ª.‘²Moreo“v“er,‘p$man“y–jÇof“them“ha•¸ãv“eŽ¡�‘Wnames–‹that“could“bšGe“v�¸ãery“useful“as“do˜cumenš¸ãt“mark-up“tags“w˜ere“they“notŽ¡�‘Wpre-empted–UUas“primitiv�¸ães“(e.g.,“Î\box“²or“Î\special²).ŽŸ���‘>ÍDesigner‘ÕTin�®9terfaceŽŽ’žY²This–èrelates“a“(hš¸ãuman)“t˜ypšGographic“designer's“sp˜eci ca-Ž¡�‘Wtion–=yfor“a“došGcumen�¸ãt“to“a“program“that“`formats“the“do˜cumen�¸ãt'.‘iÓIt“shouldŽŽŸ�’è2ŽŽŒ‹ ' y� ý£ ?� ýä�‘W²ideally–buse“a“declarativ�¸ãe“language“that“facilitates“expression“of“the“rela-ޤ �‘Wtionship–Å(and“spacing“rules“spšGeci ed“for“the“la•¸ãy“out–Å(of“the“v‘ÿqÇarious“do˜cumen�¸ãtŽ¡�‘Welemen�¸ãts.ŽŸƒ�‘WThis–¸àlanguage“is“not“em�¸ãbšGedded“in“do˜cumen�¸ãt“text“and“it“will“b˜e“v�¸ãery“di er-Ž¡�‘Wenš¸ãt–Q\in“form“to“the“do�Gcumen˜t“mark-up“language.‘ptF‘ÿ*ªor“Ïsgml²-based“systemsŽ¡�‘Wthe–½-Ïdsssl“²language“maš¸ãy“come“to“pla˜y“this“role.‘©PF‘ÿ*ªor“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX,‘#this“lev˜elŽ¡�‘Ww�¸ãas–™±almost“completely“missing“from“L�Ÿýó5�‘üff±AŽŽ–͉²T�‘þU>Ÿ'EŽ›ãxX2.09;�‘»ßL�Ÿýó5�‘üff±AŽŽ“²T�‘þU>Ÿ'EŽ˜X‘ü2�Ÿÿµ"ŽŽ‘,©:²made–™±some“im-Ž¡�‘Wpro•¸ãv“emen“ts–2Pin“this“area“but“it“is“still“the“case“that“implemen�¸ãting“a“designŽ¡�‘WspšGeci cation–}8in“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX“requires“far“more“`lo•¸ãw-lev“el'–}8co˜ding“than“is“accept-Ž¡�‘Wable.ŽŸÿ���‘>ÍProgrammer‘ÕTin�®9terfaceŽŽ’±¨¿²This–ÉÈlanguage“is“the“implemen�¸ãtation“language“withinŽ¡�‘Wwhicš¸ãh–&the“basic“t˜yp�Gesetting“functionalit˜y“is“implemen˜ted,‘1building“up�GonŽ¡�‘Wthe–÷ðprimitivš¸ães“of“T�‘þU>Ÿ'EŽ‘ãxX“(or“a“successor“program).‘Y—It“ma˜y“also“b�Ge“used“toŽ¡�‘Wimplemenš¸ãt–Ó˜the“previous“t˜w˜o“languages“`within'“T�‘þU>Ÿ'EŽ‘ãxX,‘3(as“in“the“curren˜tŽ¡�‘WL�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX‘UUsystem.Ž©}��‘MOnly–bthe“last“of“these“three“inš¸ãterfaces“is“co˜v˜ered“b˜y“this“pap�Ger,‘D%whic˜h“de-Ž¡�‘>scribšGes–/ea“system“aimed“at“pro�¸ãviding“a“suitable“basis“for“co˜ding“large“scaleŽ¡�‘>pro›Ž8jects–’|in“T�‘þU>Ÿ'EŽ‘ãxX“(but“this“should“not“preclude“its“use“for“smaller“pro˜jects).‘)main–UUdistinguishing“features“are“summarised“here.ަ����‘Mó !",š cmsy10¸ŽŽŽ‘W²A–Sµconsistenš¸ãt“naming“sc˜heme“for“all“commands,‘Tincluding“T�‘þU>Ÿ'EŽ‘ãxX“primitiv˜es.Ž©ÿ����‘M¸ŽŽŽ‘W²The–±ïclassi cation“of“commands“as“L�Ÿýó5�‘üff±AŽŽ›Í‰²T�‘þU>Ÿ'EŽ‘ãxX“functions“or“L�Ÿýó5�‘üff±AŽŽ˜²T�‘þU>Ÿ'EŽ‘ãxX“parameters,Ž¡�‘Wand–UUalso“their“division“inš¸ãto“mo�Gdules“according“to“their“functionalit˜y‘ÿ*ª.ަ����‘M¸ŽŽŽ‘W²A–UUsimple“mecš¸ãhanism“for“con˜trolling“argumen˜t“expansion.ަ����‘M¸ŽŽŽ‘W²Proš¸ãvision–Áof“a“set“of“core“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX“functions“that“is“sucien˜t“for“handlingŽ¡�‘Wprogramming–UUconstructs“sucš¸ãh“as“queues,“sets,“stac˜ks,“prop�Gert˜y“lists.ަ����‘M¸ŽŽŽ‘W²A‘¢vT�‘þU>Ÿ'EŽ‘ãxX–¢Šprogramming“en•¸ãvironmen“t–¢Šin“whic�¸ãh,›µ×for“example,˜all“white“spaceŽ¡�‘Wis‘UUignored.ŽŸ £!��‘>Ë3Ž‘VLËThe–ffnaming“sc�ŒÌhemeŽŸç�‘>²The–¯naming“con•¸ãv“en“tions–¯for“this“programming“language“distinguish“b�Get•¸ãw“eenŽ¡�‘>Ìfunctions‘=™²and›kxÌp–ÿ}'ar“ameters².‘#ÓF‘ÿ*ªunctions˜can˜ha•¸ãv“e˜argumen“ts˜and˜they˜are˜executed.Ž¡�‘>Pš¸ãarameters–Ýcan“b�Ge“assigned“v‘ÿqÇalues“and“they“are“used“in“argumen˜ts“to“functions;Ž¡�‘>they–E(are“not“directly“executed“but“are“manipulated“bš¸ãy“m˜utator“and“accessorŽ¡�‘>functions.‘=]F‘ÿ*ªunctions–™2and“parameters“with“a“related“functionalit�¸ãy“(for“exampleŽ¡�‘>accessing–(ªcounš¸ãters,‘1™or“manipulating“tok˜en-lists,‘1™etc.)“are“collected“together“in˜toŽ¡�‘>a‘UUÌmo‘ÿ}'dule².Ž¡�‘MNote–ÿ‚that“all“these“terms“are“only“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX“terminology“and“are“not,‘*for“ex-Ž¡�‘>ample,‘+Winš¸ãtended–ÍWto“indicate“that“the“commands“ha˜v˜e“these“prop�Gerties“whenŽ¡�‘>considered–_þin“the“conš¸ãtext“of“basic“T�‘þU>Ÿ'EŽ‘ãxX“or“in“an˜y“more“general“programmingŽ¡�‘>con�¸ãtext.ŽŽŸ�’è3ŽŽŒ‹‡ y� ý£ ?� ýä��‘>ó%ÂÖN  cmbx12Ð3.1Ž‘\ÀExamplesŽŸuT�‘>²Before–ngiving“the“details“of“the“naming“scš¸ãheme,‘6here“are“a“few“t˜ypical“examplesޤ �‘>to–UUindicate“the“ a•¸ãv“our–UUof“the“sc�¸ãheme;“ rst“some“parameter“names.Ž©�‘WÎ\l_tmpa_box–)²is“a“lošGcal“parameter“(hence“the“Îl_“²pre x)“corresp˜ond-Ž¡�‘Wing–UUto“a“b�Go�¸ãx“register.Ž¡�‘WÎ\g_tmpa_int–ƒ*²is“a“global“parameter“(hence“the“Îg_“²pre x)“corresp�Gond-Ž¡�‘Wing–UUto“an“inš¸ãteger“register“(i.e.,“a“T�‘þU>Ÿ'EŽ‘ãxX“coun˜t“register).Ž¡�‘WÎ\c_empty_toks–ùɲis“the“constanš¸ãt“(Îc_²)“tok˜en“register“parameter“thatŽ¡�‘Wis–UUfor“evš¸ãer“empt˜y‘ÿ*ª.ަ�‘>Noš¸ãw–UUhere“is“an“example“of“a“t˜ypical“function“name.Ž¡�‘MÎ\seq_push:Nn–V…²is“the“function“whicš¸ãh“puts“the“tok˜en“list“sp�Geci ed“b˜y“its“secondŽ¡�‘>argumen•¸ãt›È$on“to˜the˜stac“k˜sp�Geci ed˜b“y˜its˜ rst˜argumen“t.‘B·The˜di eren“t˜natures˜ofŽ¡�‘>the›9t•¸ãw“o˜argumen“ts˜are˜indicated˜b“y˜the˜Î:Nn˜²sux.‘h[The˜ rst˜argumen“t˜m“ust˜b�GeŽ¡�‘>a–Bšsingle“tokš¸ãen“whic˜h“`names'“the“stac˜k“parameter:‘hjsuc˜h“single-tok˜en“argumen˜tsŽ¡�‘>are–‘sdenoted“ÎN².“The“second“argumenš¸ãt“is“a“normal“T�‘þU>Ÿ'EŽ‘ãxX“`undelimited“argumen˜t',Ž¡�‘>whic•¸ãh›gæma“y˜either˜b�Ge˜a˜single˜tok“en˜or˜a˜balanced,‘¬‰brace-delimited˜tok“en˜listŽ¡�‘>(whic•¸ãh›Tõw“e˜shall˜here˜call˜a˜Ìbr–ÿ}'ac“e“d–token“list‘òز):‘qthe˜În˜²denotes˜suc�¸ãh˜a˜`normal'Ž¡�‘>argumen�¸ãt‘UUform.Ž¡�‘MÎ\seq_push:cn–�@²w�¸ãould“bšGe“similar“to“the“ab˜o•¸ãv“e,‘¯;but–�@in“this“case“the“Îc“²meansŽ¡�‘>that–ì°the“stacš¸ãk-name“is“sp�Geci ed“in“the“ rst“argumen˜t“b˜y“a“tok˜en“list“that“ex-Ž¡�‘>pands,–Öusing›¼WÎ\csname...²,“to˜a˜con•¸ãtrol˜sequence˜that˜is˜the˜Ìname‘|²²of˜the˜stac“kŽ¡�‘>parameter.Ž¡�‘>The–‚¹names“of“these“t•¸ãw“o–‚¹functions“also“indicate“that“they“are“in“the“mo�GduleŽ¡�‘>called‘UUÎseq².ŽŸþ6��‘>Ð3.2Ž‘\ÀF‘þàormal–€synš tax“of“the“con˜v˜en˜tionsŽŸuT�‘>²W‘ÿ*ªe–UUshall“noš¸ãw“lo�Gok“in“more“detail“at“the“syn˜tax“of“these“names.Ž¡�‘>The–UUsynš¸ãtax“of“parameter“names“is“as“follo˜ws:ަ�‘WÎ\¸hÌac–ÿ}'c“ess‘Ò!¸iÎ_¸hÌmo“dule›À[¸iÎ_¸hÌdescription‘Äc¸iÎ_¸hÌtyp“e˜¸iަ�‘>²The–UUsynš¸ãtax“of“function“names“is“as“follo˜ws:ަ�‘WÎ\¸hÌmo–ÿ}'dule‘À[¸iÎ_¸hÌdescription‘Äc¸iÎ:¸hÌar“g-sp“e“c‘�¶¸iŽŸþ6��‘>Ð3.3Ž‘\ÀMo�`dules–€and“descriptionsŽŸuT�‘>²The–UUsynš¸ãtax“of“all“names“con˜tainsަ�‘W¸hÌmo‘ÿ}'dule‘À[¸i–UU²and“¸hÌdescription‘Äc¸i²:ަ�‘>these–UUbšGoth“giv�¸ãe“information“ab˜out“the“command.Ž¡�‘MA‘·Ìmo‘ÿ}'dule‘ƒ7²is–ÂÜa“collection“of“closely“related“functions“and“parameters.‘@ôT�¸ãypicalŽ¡�‘>mo�Gdule–ðznames“include“Îint“²for“in�¸ãteger“parameters“and“related“functions,“Îseq“²forŽ¡�‘>sequences–UUand“Îbox“²for“b�Go�¸ãxes.ŽŽŸ�’è4ŽŽŒ‹)Ë y� ý£ ?� ýä�‘M²P•¸ãac“k‘ÿqÇages›Ó»pro“viding˜new˜programming˜functionalit“y˜will˜add˜new˜mo�Gdules˜asޤ �‘>needed;‘ôethe–Ãíprogrammer“can“cš¸ãho�Gose“an˜y“un˜used“name,‘áconsisting“of“letters“only‘ÿ*ª,Ž¡�‘>for–UUa“mo�Gdule.Ž¡�‘MThe–ë¤Ìdescription‘°²giv�¸ães“more“detailed“information“ab�Gout“the“function“or“para-Ž¡�‘>meter,‘vand–ÃÖpro�¸ãvides“a“unique“name“for“it.‘½JIt“should“consist“of“letters“and,Ž¡�‘>p�Gossibly‘ÿ*ª,–UUÎ_“²c�¸ãharacters.ŽŸþ6��‘>Ð3.4Ž‘\ÀPš arameters:‘access–€and“t˜yp�`eŽŸuT�‘>²The›*±¸hÌac–ÿ}'c“ess‘Ò!¸i˜²part˜of˜the˜name˜describ•Ges˜ho�¸ãw˜the˜parameter˜can˜b“e˜accessed.Ž¡�‘>Pš¸ãarameters–k“are“primarily“classi ed“as“lo�Gcal,‘šSglobal“or“constan˜t“(there“are“further,Ž¡�‘>more–"tecš¸ãhnical,‘Æclasses).‘V This“Ìac–ÿ}'c“ess‘ÔC²t˜yp•Ge›"app“ears˜as˜a˜co“de˜at˜the˜b“eginning˜ofŽ¡�‘>the–UUname;“the“co�Gdes“used“include:ޤ����‘Lã’ÍcŽŽŽ‘W²constanš¸ãts–UU(global“parameters“whose“v‘ÿqÇalue“should“not“b�Ge“c˜hanged);Ž¡����‘L@ÍgŽŽŽ‘W²parameters–UUwhose“v‘ÿqÇalue“should“only“b�Ge“set“globally;Ž¡����‘NÎ<ÍlŽŽŽ‘W²parameters–UUwhose“v‘ÿqÇalue“should“only“bšGe“set“lo˜cally‘ÿ*ª.Ž¡�‘MThe–À7¸hÌtyp‘ÿ}'e‘À[¸i“²will“normally“(except“when“inš¸ãtro�Gducing“a“new“data-t˜ypšGe)“b˜e“inޤ �‘>the–Ólist“of“aš¸ãv‘ÿqÇailable“Ìdata-typ‘ÿ}'es‘Ò!²;‘þ|these“include“the“primitiv˜e“T�‘þU>Ÿ'EŽ‘ãxX“data-t˜yp�Ges,‘ísuc˜hŽ¡�‘>as–ˆNthe“v‘ÿqÇarious“registers,‘• but“to“these“will“bšGe“added“data-t�¸ãyp˜es“built“within“theŽ¡�‘>L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX–UUprogramming“system.Ž¡�‘MHere–UUare“some“tš¸ãypical“data-t˜yp�Ge“names:ޤ���‘>Íin�®9tŽŽ‘P¼m²in•¸ãteger-v‘ÿqÇalued›UUcoun“t˜register;Ž¡���‘>ÍtoksŽŽ‘WÓá²tok�¸ãen‘UUregister;Ž¡���‘>Íb�QÇo�®9xŽŽ‘U5O²b�Go�¸ãx‘UUregister;Ž¡���‘>Í n�®9tŽŽ‘Sî3²`F‘ÿ*ªak•¸ãe-in“teger':‘(‚(or›°³fak“e-coun“ter)˜a˜data˜t“yp�Ge˜created˜to˜a“v“oid˜problemsŽ© �‘Wwith–UUthe“limited“n•¸ãum“b�Ger–UUof“aš¸ãv‘ÿqÇailable“coun˜t“registers“in“(standard)“T�‘þU>Ÿ'EŽ‘ãxX;Ž¡���‘>ÍseqŽŽ‘RàU²`sequence':‘ia–Ddata-tš¸ãyp�Ge“used“to“implemen˜t“lists“(with“access“at“b�Goth“ends)ަ�‘Wand‘UUstac�¸ãks;Ž¡���‘>ÍplistŽŽ‘XÉ6²prop�Gert�¸ãy‘UUlistŽ¡�‘>When–æ�the“¸hÌtyp›ÿ}'e‘À[¸i“²and“¸hÌmo˜dule‘À[¸i“²are“iden�¸ãtical“(as“often“happ�Gens“in“the“more“basicަ�‘>mo�Gdules)–UUthe“¸hÌmo‘ÿ}'dule‘À[¸i“²part“is“often“omitted“for“aesthetic“reasons.ŽŸþ6��‘>Ð3.5Ž‘\ÀF‘þàunctions:‘argumen� t‘€sp�`eci cationsŽŸuT�‘>²F‘ÿ*ªunction–ÅSnames“end“with“an“¸hÌar–ÿ}'g-sp“e“c‘�¶¸i–ÅS²after“a“colon.‘AÇThis“giv�¸ães“an“indication“ofަ�‘>the–&Ptš¸ãyp�Ges“of“argumen˜t“that“a“function“tak˜es,‘/·and“pro˜vides“a“con˜v˜enien˜t“metho�Gdަ�‘>of–:§naming“similar“functions“that“di er“only“in“their“argumen�¸ãt“forms“(see“theަ�‘>next–UUsection“for“examples).ŽŽŸ�’è5ŽŽŒ‹4ï y� ý£ ?� ýä�‘M²The›†¾¸hÌar–ÿ}'g-sp“e“c‘�¶¸i˜²consists˜of˜a˜(p�Gossibly˜empt•¸ãy)˜list˜of˜c“haracters,‘°eac“h˜denotingޤ �‘>one–targumenš¸ãt“of“the“function.‘‚%It“is“imp�Gortan˜t“to“understand“that“`argumen˜t'Ž¡�‘>here–9 refers“to“the“e ectivš¸ãe“argumen˜t“of“the“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX“function,‘>´not“to“an“argumen˜tŽ¡�‘>at–:öthe“T�‘þU>Ÿ'EŽ‘ãxX-levš¸ãel.‘hýIndeed,‘@Ÿ'EŽ‘ãxX“macro“that“has“this“name“t˜ypicallyŽ¡�‘>has–Jno“argumenš¸ãts.‘nThis“is“an“extension“of“the“existing“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX“con˜v˜en˜tion“whereŽ¡�‘>one–[%saš¸ãys“that“Î\section“²has“an“optional“argumen˜t“and“a“mandatory“argumen˜t,Ž¡�‘>whereas–„)the“T�‘þU>Ÿ'EŽ›ãxX“macro“Î\section“²actually“has“zero“parameters“at“the“T�‘þU>Ÿ'EŽ˜X“lev�¸ãel,Ž¡�‘>it–S1merely“calls“an“inš¸ãternal“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX“command“whic˜h“in“turn“calls“others“that“lo�GokŽ¡�‘>ahead–UUfor“star“forms“and“optional“argumen�¸ãts.Ž¡�‘MThe–UUlist“of“pšGossible“argumen�¸ãt“sp˜eci ers“includes“the“follo�¸ãwing.Ž©����‘KœvÍnŽŽŽ‘W²Unexpanded–UUtokš¸ãen“or“braced“tok˜en“list.Ž¡�‘WThis–UUis“a“standard“T�‘þU>Ÿ'EŽ‘ãxX“undelimited“macro“argumen�¸ãt.ަ����‘L@ÍoŽŽŽ‘W²One-lev•¸ãel-expanded›UUtok“en˜or˜braced˜tok“en˜list.Ž¡�‘WThis–žòmeans“that“the“argumenš¸ãt“is“expanded“one“lev˜el,‘Ãmas“b˜y“Î\expandafter²,Ž¡�‘Wand–©ÍXŽŽŽ‘W²F‘ÿ*ªully-expanded–UUsingle“tokš¸ãen“(un˜braced).Ž¡�‘WAs–Nfor“Îx²,‘O�the“full“expansion“is“passed“(as“a“braced“tok�¸ãen“list)“to“the“func-Ž¡�‘Wtion.ަ����‘I±ÌÍCŽŽŽ‘W²Character–UUstring“used“as“a“command“name“then“one-lev�¸ãel“expanded.Ž¡�‘WThe–êˆform“of“the“argumenš¸ãt“is“exactly“as“for“Îc²,‘Õbut“the“resulting“tok˜en“isŽ¡�‘Wthen–a[expanded“one“lev�¸ãel“(as“for“ÎO²),“and“the“expansion“is“passed“to“theŽ¡�‘Wfunction–UUas“a“braced“tok�¸ãen“list.ŽŽŸ�’è6ŽŽŒ‹@P y� ý£ ?� ýä����‘KœvÍpŽŽŽ‘W²Primitiv�¸ãe–UUT�‘þU>Ÿ'EŽ‘ãxX“parameter“sp�Geci cation.ޤ �‘WThis–dÿcan“b�Ge“something“simple“likš¸ãe“Î#1#2#3²,‘•but“ma˜y“use“arbitrary“delimitedŽ¡�‘Wargumen•¸ãt›UUsyn“tax˜suc“h˜as:‘qÇÎ#1,#2\q_stop#3².Ž©����‘I‘ÐÍT,FŽŽŽ‘a²These–áare“spšGecial“cases“of“În“²argumen�¸ãts,‘%Åused“for“the“true“and“false“co˜deŽ¡�‘Win–UUconditional“commands.ަ�‘>There–UUare“t•¸ãw“o–UUother“sp�Geci ers“with“more“general“meanings:ަ����‘I.>ÍDŽŽŽ‘W²This›”2means:‘5ÍDo–÷8not“use².‘1fThis˜sp�Gecial˜case˜is˜used˜for˜T�‘þU>Ÿ'EŽ‘ãxX˜primitiv�¸ães˜andŽ¡�‘Wother–éðcommands“that“are“pro�¸ãvided“for“use“only“while“b•Go“otstrapping‘éðtheŽ¡�‘WL�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ›ãxX–Yk�¸ãernel.‘µIf“the“T�‘þU>Ÿ'EŽ˜X“primitivš¸ãe“needs“to“b�Ge“used“in“other“con˜texts“it“willŽ¡�‘Wb�Ge–¶*givš¸ãen“an“alternativ˜e,›Î_more“appropriate,˜name“with“a“useful“argumen�¸ãtŽ¡�‘Wsp�Geci cation.‘^mThe–ùŒargumenš¸ãt“syn˜tax“of“these“is“often“w˜eird,‘"šin“the“senseŽ¡�‘Wdescrib�Ged‘UUnext.ަ����‘I±ÌÍwŽŽŽ‘W²This–$means“that“the“argumenš¸ãt“syn˜tax“is“`w˜eird'“in“that“it“do�Ges“not“fol-Ž¡�‘Wlo•¸ãw›šgan“y˜standard˜rule.‘@üIt˜is˜used˜for˜functions˜with˜argumen“ts˜that˜tak“eŽ¡�‘Wnon–÷ standard“forms:‘Bìexamples“are“T�‘þU>Ÿ'EŽ‘ãxX-levš¸ãel“delimited“argumen˜ts“and“theŽ¡�‘Wb•Go“olean–UUtests“needed“after“certain“primitiv�¸ãe“Î\if².–ªª.“.‘ÿÿcommands.ŽŸ!Ä��‘>Ë4Ž‘VLËExpansion‘ffcon�ŒÌtrolŽŸç��‘>Ð4.1Ž‘\ÀSimpler–€means“b�`etterŽŸuT�‘>²An•¸ãy“one–þ³who“programs“in“T�‘þU>Ÿ'EŽ‘ãxX“is“frustratingly“familiar“with“the“problem“ofŽ¡�‘>arranging–Ethat“argumen�¸ãts“to“functions“are“suitably“expanded“b�Gefore“the“functionŽ¡�‘>is–L.called.‘VQT‘ÿ*ªo“illustrate“hoš¸ãw“expansion“con˜trol“can“bring“instan˜t“relief“to“thisŽ¡�‘>problem–UUwš¸ãe“shall“consider“t˜w˜o“examples“copied“from“Îlatex.ltx².Ž©�‘HúÎ\globalŽ¡�‘Hú\expandafterŽ¡�‘Rÿô\expandafterŽ¡�‘Hú\expandafterŽ¡�‘]î\letŽ¡�‘Hú\expandafterŽ¡�‘Rÿô\reserved@aŽ¡�‘Hú\csname–?ý\curr@fontshape“\endcsnameަ�‘>²This–Ž8 rst“piece“of“co�Gde“is“in“essence“simply“a“global“Î\let².‘oHo•¸ãw“ev“er,‘œpthe‘Ž8tok“enŽ¡�‘>to–X�b�Ge“de ned“is“obtained“bš¸ãy“expanding“Î\reserved@a“²one“lev˜el;‘ZAand,–Yow˜orse,“theŽ¡�‘>tokš¸ãen–|,to“whic˜h“it“is“to“b�Ge“let“is“obtained“b˜y“fully“expanding“Î\curr@fontshapeŽ¡�‘>²and–_üthen“using“the“cš¸ãharacters“pro�Gduced“b˜y“that“expansion“to“construct“a“com-Ž¡�‘>mand–:Šname.‘!fThe“result“is“a“mess“of“in•¸ãterw“o“v“en–:ŠÎ\expandafter“²and“Î\csnameŽ¡�‘>²bšGelo•¸ãv“ed–UUof“all“T�‘þU>Ÿ'EŽ‘ãxX“programmers,“and“the“co˜de“is“essen�¸ãtially“unreadable.Ž¡�‘MUsing–lèthe“con•¸ãv“en“tions–lèand“functionalitš¸ãy“outlined“here,‘²Ìthe“task“w˜ould“b�GeŽ¡�‘>ac•¸ãhiev“ed–UUwith“co�Gde“suc�¸ãh“as“this:ŽŽŸ�’è7ŽŽŒ‹M y� ý£ ?� ýä�‘HúÎ\glet:Oc‘?ý\g_reserved_a_tlpޤ �’‚?Ù\l_current_font_shape_tlpŽ©‡¬�‘>²The–J«command“Î\glet:Oc“²is“a“global“Î\let“²that“expands“its“ rst“argumen�¸ãt“once,Ž¡�‘>and–=Ñgenerates“a“command“name“out“of“its“second“argumen�¸ãt,‘B…b�Gefore“making“theŽ¡�‘>de nition.‘ýThis–�¼prošGduces“co˜de“that“is“far“more“readable“and“more“lik�¸ãely“to“b˜eŽ¡�‘>correct–UU rst“time.Ž¡�‘MHere–UUis“the“second“example.ަ�‘HúÎ\expandafterŽ¡�‘Rÿô\in@Ž¡�‘Hú\csname‘?ýsym#3%Ž¡�‘Rÿô\expandafterŽ¡�‘]î\endcsnameŽ¡�‘Rÿô\expandafterŽ¡�‘]î{%Ž¡�‘Rÿô\group@list}%ަ�‘>²This–Apiece“of“cošGde“is“part“of“the“de nition“of“another“function.‘\It“ rst“pro˜ducesŽ¡�‘>t•¸ãw“o–Þbthings:‘ƒáa“tokš¸ãen“list,‘¥b˜y“expanding“Î\group@list“²once;‘"èand“a“tok˜en“whoseŽ¡�‘>name–=Ýcomes“from“`Îsym#3²'.‘iôThen“the“function“Î\in@“²is“called“and“this“tests“if“itsŽ¡�‘> rst–UUargumenš¸ãt“o�Gccurs“in“the“tok˜en“list“of“its“second“argumen˜t.Ž¡�‘MAgain–ÖÙwš¸ãe“can“impro˜v˜e“enormously“on“the“co�Gde.‘öRFirst“w˜e“shall“rename“theŽ¡�‘>function–20Î\in@“²according“to“our“con•¸ãv“en“tions.‘fA‘2'function›20suc“h˜as˜this˜but˜takingŽ¡�‘>t•¸ãw“o–€normal“`În²'“argumenš¸ãts“migh˜t“reasonably“b�Ge“named“Î\seq_test_in:nn²;‘•Wth˜usŽ¡�‘>the–¢åv‘ÿqÇarianš¸ãt“function“w˜e“need“will“b�Ge“de ned“with“the“appropriate“argumen˜tŽ¡�‘>t�¸ãypšGes–²øand“its“name“will“b˜e“Î\seq_test_in:cO².“No�¸ãw“this“co˜de“fragmen�¸ãt“will“b˜eŽ¡�‘>simply:ަ�‘HúÎ\seq_test_in:cO–?ý{sym#3}“\l_group_seqަ�‘>²Note–¼Sthat,›Öin“addition“to“the“lac�¸ãk“of“Î\expandafter²,˜the“space“after“the“Î}“²willŽ¡�‘>b�Ge–ç°silenš¸ãtly“ignored“since“all“white“space“is“ignored“in“this“programming“en˜viron-Ž¡�‘>men�¸ãt.ŽŸäO��‘>Ð4.2Ž‘\ÀNew–€functions“from“oldŽŸuT�‘>²F‘ÿ*ªor–ÇÐmanš¸ãy“common“functions“the“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX3“k˜ernel“will“pro˜vide“v‘ÿqÇarian˜ts“with“aŽ¡�‘>range–Ñ5of“argumenš¸ãt“forms,‘ð-and“similarly“it“is“exp�Gected“that“extension“pac˜k‘ÿqÇagesŽ¡�‘>proš¸ãviding–Bònew“functions“will“mak˜e“them“a˜v‘ÿqÇailable“in“the“all“the“commonly“neededŽ¡�‘>forms.Ž¡�‘MHo•¸ãw“ev“er,‘�Åthere–[áwill“bšGe“o˜ccasions“where“it“is“necessary“to“construct“a“new“suc�¸ãhŽ¡�‘>v‘ÿqÇarianš¸ãt–IÓform;‘M©therefore“the“expansion“mo�Gdule“pro˜vides“a“straigh˜tforw˜ard“mec˜h-Ž¡�‘>anism–ØËfor“the“creation“of“functions“with“anš¸ãy“required“argumen˜t“t˜yp�Ge,‘ù©startingŽ¡�‘>from–UUa“function“that“takš¸ães“`normal'“T�‘þU>Ÿ'EŽ‘ãxX“undelimited“argumen˜ts.Ž¡�‘MT‘ÿ*ªo–œrillustrate“this“let“us“supp�Gose“yš¸ãou“ha˜v˜e“a“`base“function'“Î\demo_cmd:nnnŽ¡�‘>²that–Hªtakš¸ães“three“normal“argumen˜ts,‘K2and“that“y˜ou“need“to“construct“the“v‘ÿqÇarian˜tŽ¡�‘>Î\demo_cmd:cnx²,‘��for–‚[whicš¸ãh“the“ rst“argumen˜t“is“used“to“construct“the“Ìname‘B¶²ofŽŽŸ�’è8ŽŽŒ‹ X[ y� ý£ ?� ýä�‘>²a–mVcommand,‘³Vwhilst“the“third“argumenš¸ãt“m˜ust“bšGe“fully“expanded“b˜efore“b˜eingޤ �‘>passed–<,to“Î\demo_cmd:nnn².‘<‘ÿ*ªo“pro�Gduce“the“v‘ÿqÇarian�¸ãt“form“from“the“base“form,Ž¡�‘>simply–UUuse“this:ޤu�‘HúÎ\exp_def_form:nnn–?ý{demo_cmd}“{nnn}“{cnx}Ž¡�‘>²This–UUde nes“the“v‘ÿqÇarianš¸ãt“form“so“that“y˜ou“can“then“write,“for“example:Ž¡�‘HúÎ\demo_cmd:cnx–?ý{abc}“{pq}“{\rst“\xyz“}Ž¡�‘>²rather–UUthan“.–ªª.“.‘ÿÿwš¸ãell,–UUsomething“lik˜e“this!Ž¡�‘HúÎ\def–?ý\tempa“{{pq}}%ޤ �‘Hú\edef–?ý\tempb“{\rst“\xyz}%Ž¡�‘Hú\expandafterŽ¡�‘Rÿô\demo@cmdŽ¡�‘Hú\csname‘?ýabc%Ž¡�‘Rÿô\expandafterŽ¡�‘]î\expandafterŽ¡�‘Rÿô\expandafterŽ¡�‘gÿè\endcsnameŽ¡�‘Rÿô\expandafterŽ¡�‘]î\tempaŽ¡�‘Rÿô\expandafterŽ¡�‘]î{%Ž¡�‘Rÿô\tempbŽ¡�‘]î}%Ž©u�‘M²Another–.example:‘^yš¸ãou“ma˜y“wish“to“declare“a“function“Î\demo_cmd_b:xcxcx²,Ž¡�‘>a–]ªv‘ÿqÇarian�¸ãt“of“an“existing“function“Î\demo_cmd_b:nnnnn²,‘Ÿ¿that“fully“expands“ar-Ž¡�‘>gumenš¸ãts–}¾1,“3“and“5,‘ÇØand“pro�Gduces“commands“to“pass“as“argumen˜ts“2“and“4Ž¡�‘>using–UUÎ\csname².‘qÇThe“de nition“y�¸ãou“need“is“simplyަ�‘HúÎ\exp_def_form:nnnŽ¡�‘Rÿô{demo_cmd_b}–?ý{nnnnn}“{xcxcx}ަ�‘M²This–žŸextension“mec�¸ãhanism“is“written“so“that“if“the“same“new“form“of“someŽ¡�‘>existing–P&command“is“implemenš¸ãted“b˜y“t˜w˜o“extension“pac˜k‘ÿqÇages“then“the“t˜w˜o“def-Ž¡�‘>initions–UUwill“b�Ge“idenš¸ãtical“and“th˜us“no“con ict“will“o�Gccur.ŽŸ ßì��‘>Ë5Ž‘VLËP•ŒÌarameter›©ºassignmen“ts˜and˜accessor˜functionsŽŸç��‘>Ð5.1Ž‘\ÀChec• king‘€assignmen“tsŽŸuT�‘>²One–o”of“the“adv‘ÿqÇanš¸ãtages“of“ha˜ving“a“consisten˜t“sc˜heme“is“that“the“system“canŽ¡�‘>proš¸ãvide–ÍËmore“extensiv˜e“error-c˜hec˜king“and“debugging“facilities.‘D™F‘ÿ*ªor“example,‘èçanŽ¡�‘>accessor–7=function“that“makš¸ães“a“Ìglob‘ÿ}'al‘?Ʋassignmen˜t“of“a“v‘ÿqÇalue“to“a“parameter“canŽ¡�‘>c•¸ãhec“k–‚7that“it“is“not“passed“the“name“of“a“Ìlo–ÿ}'c“al‘ŠÀ²parameter–‚7as“that“argumen�¸ãt:‘Ë‹itŽ¡�‘>do�Ges–UUthis“bš¸ãy“c˜hec˜king“that“the“name“starts“with“Î\g_².ŽŽŸ�’è9ŽŽŒ‹ c’ y� ý£ ?� ýä�‘M²Suc•¸ãh›ñc“hec“king˜is˜probably˜to�Go˜slo“w˜for˜normal˜use,‘Šbut˜the˜co�Gde˜can˜ha“v“eޤ �‘>hošGoks–ï9built“in“that“allo�¸ãw“a“format“to“b˜e“made“in“whic�¸ãh“all“functions“p˜erformŽ¡�‘>this–UUkind“of“c•¸ãhec“k.Ž¡�‘MA‘¶rtš¸ãypical–¶šsection“of“the“source��Ÿü^ÿ±1ŽŽ‘3 ²for“suc˜h“co�Gde“migh˜t“lo�Gok“lik˜e“this“(recall“thatŽ¡�‘>all–UUwhite“space“is“ignored):Ž©�‘HúÎ%<*!check>Ž¡�‘Hú\let_new:NNŽ¡�‘Rÿô\toks_gset:Nn‘?ý\tex_global:DŽ¡�‘Hú%Ž¡�‘Hú%<*check>Ž¡�‘Hú\def_new:NpnŽ¡�‘Rÿô\toks_gset:Nn‘?ý#1Ž¡�‘]î{Ž¡�‘]î\chk_global:N‘?ý#1Ž¡�‘]î\tex_global:D‘?ý#1Ž¡�‘]î}Ž¡�‘Hú%ަ�‘>²In–I�the“abšGo•¸ãv“e–I�co˜de“the“function“Î\toks_gset:Nn“²takš¸ães“a“single“tok˜en“(ÎN²)‘I>sp�GecifyingŽ¡�‘>a–Âvtokš¸ãen“register,‘ßÖand“globally“sets“it“to“the“v‘ÿqÇalue“passed“in“the“second“argumen˜t.Ž¡�‘MA–UUtš¸ãypical“use“of“it“w˜ould“b�Ge:ޤ�‘HúÎ\toks_gset–?ý\g_xxx_toks“{}Ž¡�‘>²In–±¢the“normal“de nition,‘ȵÎ\toks_gset“²can“bšGe“simply“Î\let“²to“Î\global“²b˜ecauseޤ �‘>the–3primitivš¸ãe“T�‘þU>Ÿ'EŽ‘ãxX“tok˜en“register“do�Ges“not“require“an˜y“explicit“assignmen˜t“func-Ž¡�‘>tion:‘qÇthis–UUis“done“b�¸ãy“the“Î%<*!check>“²cošGde“ab˜o•¸ãv“e.Ž¡�‘MThe–*alternativš¸ãe“de nition“ rst“c˜hec˜ks“that“the“argumen˜t“passed“as“Î#1“²is“theŽ¡�‘>name–Çdof“a“global“parameter“and“raises“an“error“if“it“is“not.‘BwIt“do�Ges“this“b�¸ãy“takingŽ¡�‘>apart–UUthe“command“name“passed“as“Î#1“²and“c•¸ãhec“king–UUthat“it“starts“Î\g_².ŽŸþ6��‘>Ð5.2Ž‘\ÀConsistencyŽŸuT�‘>²The–×Dprimitivš¸ãe“T�‘þU>Ÿ'EŽ‘ãxX“syn˜tax“for“register“assignmen˜ts“has“a“v˜ery“minimal“syn˜taxŽ¡�‘>and,›„äapart–PÇfrom“b�Go�¸ãx“functions,˜there“are“no“explicit“functions“for“assigning“v‘ÿqÇaluesŽ¡�‘>to–UUthese“registers.Ž¡�‘MThis–/¡makš¸ães“it“imp�Gossible“to“implemen˜t“alternativ˜e“data-t˜yp�Ges“with“a“syn-Ž¡�‘>tax–ÖØthat“is“b�Goth“consistenš¸ãt“and“at“all“similar“to“the“syn˜tax“for“the“primitiv˜es;Ž¡�‘>moreo•¸ãv“er,–UUit“encourages“a“co�Gding“stš¸ãyle“that“is“v˜ery“error“prone.Ž¡�‘MAs–‘Úin“the“Î\toks_gset:Nn“²example“givš¸ãen“ab�Go˜v˜e,‘¸óall“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX“data-t˜yp�Ges“are“pro-Ž¡�‘>vided–kawith“explicit“functions“for“assignmenš¸ãt“and“for“use,‘päev˜en“when“these“ha˜v˜eŽ¡�‘>essen•¸ãtially›*¦empt“y˜de nitions.‘c�This˜allo“ws˜for˜b�Getter˜error-c“hec“king˜as˜describ�GedŽ¡�‘>ab�Go•¸ãv“e;‘2Éit–!‚also“alloš¸ãws“the“construction“of“further“data-t˜yp�Ges“with“a“similar“in˜ter-Ž¡�‘>face,‘ìevš¸ãen–ÒJwhen“the“implemen˜tation“of“the“asso�Gciated“functions“is“v˜ery“complex.Ž‘>ŸX-‰ff‰ÿvŸ J=����‘ "5Ÿý-:À1ŽŽŽ‘LÜ¿This–ÕXcošpšGear–Uíat“the“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX“programming“lev�¸ãel“to“b˜e“exactly“likš¸ãe“the“data-t˜yp�Ge“based“onŽ¡�‘>primitiv•¸ãe› Ccoun“t˜registers;‘#ôho“w“ev“er,‘in“ternally˜it˜mak“es˜no˜use˜of˜coun“t˜registers.Ž¡�‘>T�¸ãypical–UUfunctions“in“this“mo�Gdule“are“illustrated“here.ޤb�‘>Î\fint_new:N‘?ý\l_tmpa_fintŽ¡�‘>²This–UUdeclares“the“lo�Gcal“parameter“Î\l_example_fint“²as“a“fak•¸ãe-coun“ter.Ž¡�‘>Î\fint_add:Nn–?ý\l_example_fint“\c_thirty_twoŽ¡�‘>²This–UUincremenš¸ãts“the“v‘ÿqÇalue“of“this“fak˜e-coun˜ter“b˜y“32.ŽŸ ½ö��‘>Ë6Ž‘VLËThe–ffexp�s3erimen�ŒÌtal“distributionŽŸç�‘>²The–˜žinitial“implemen�¸ãtations“of“a“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX“programming“language“using“this“kind“ofޤ �‘>syn�¸ãtax–æremain“unreleased“(and“not“completely“functional);‘¶they“partly“pre-dateŽ¡��‘>L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX‘ü2�Ÿÿµ"ŽŽ‘cSª²!‘h1The–8“planned“distribution“will“proš¸ãvide“a“subset“of“the“functionalit˜y“ofŽ¡�‘>those–UUimplemenš¸ãtations,“in“the“form“of“pac˜k‘ÿqÇages“to“b�Ge“used“on“top“of�“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX‘ü2�Ÿÿµ"ŽŽ‘(¨ÿ².Ž¡�‘MThe›+_in•¸ãten“tion˜is˜to˜allo“w˜exp•Gerienced˜T�‘þU>Ÿ'EŽ‘ãxX˜programmers˜to˜exp“erimen�¸ãt˜withŽ¡�‘>the–¾!system“and“to“commenš¸ãt“on“the“in˜terface.‘¬,This“means“that“ó'F C– cmbxti10Òthe‘”interfac‘ÿi>eŽ¡�‘>wil‘–Ál‘�Áchange².‘¢ÕNo–»part“of“this“system,›Ôpincluding“the“name“of“an�¸ãything,˜shouldŽ¡�‘>bšGe–‹Nrelied“up˜on“as“b˜eing“a�¸ãv‘ÿqÇailable“in“a“later“release.‘±Please“do“Ìexp‘ÿ}'eriment‘~&²withŽ¡�‘>these–�Ipacš¸ãk‘ÿqÇages,‘Âbut“do“Ìnot‘�!²use“them“for“co�Gde“that“y˜ou“exp�Gect“to“k˜eep“unc˜hangedŽ¡�‘>o•¸ãv“er–UUa“long“p•Gerio“d.Ž¡�‘MIn–¹6view“of“the“inš¸ãtended“exp�Gerimen˜tal“use“for“this“distribution“w˜e“shall,‘Øoin“theŽ¡�‘> rst–”instance,‘"TprošGduce“only“a“few“mo˜dules“for“use“with�“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX‘ü2�Ÿÿµ"ŽŽ‘(i>².‘\‡These“will“setŽ¡�‘>up–÷òthe“con•¸ãv“en“tions–÷òand“the“basic“functionalit�¸ãy“of,› ™for“example,˜the“expansionŽ¡�‘>mecš¸ãhanism;‘Îuthey–‹will“also“implemen˜t“some“of“the“basic“programming“constructs,Ž¡�‘>sucš¸ãh–»¹as“tok˜en-lists“and“sequences.‘¤óThey“are“in˜tended“only“to“giv˜e“a“ a˜v˜our“ofŽ¡�‘>the–>co�Gde:‘C#the“full“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX3“kš¸ãernel“will“pro˜vide“a“v˜ery“ric˜h“set“of“programmingŽ¡�‘>constructs–…�so“that“pacš¸ãk‘ÿqÇages“can“ecien˜tly“share“co�Gde,‘‘Œin“con˜trast“with“the“sit-Ž¡�‘>uation–;çin“the“currenš¸ãt“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX“where“ev˜ery“large“pac˜k‘ÿqÇage“m˜ust“implemen˜t“its“o˜wnŽ¡�‘>vš¸ãersion–UUof“queues,“stac˜ks,“etc.,“as“necessary‘ÿ*ª.Ž¡�‘MIn–·the“ rst“release“of“this“exp�Gerimenš¸ãtal“system“at“least“the“follo˜wing“mo�GdulesŽ¡�‘>will–UUb�Ge“distributed.ŽŸz´���‘>Íl3namesŽŽ‘kPK²This–óasets“up“the“basic“naming“sc�¸ãheme“and“renames“all“the“T�‘þU>Ÿ'EŽ‘ãxX“prim-Ž¡�‘Witiv�¸ães.‘=IIf–™+it“is“loaded“with“the“option“Î[removeoldnames]“²then“the“oldŽ¡�‘Wprimitivš¸ãe–Ýznames“suc˜h“as“Î\box“²b�Gecome“Ìunde ne‘ÿ}'d‘æ²and“are“th˜us“a˜v‘ÿqÇailable“forŽ¡�‘Wuser–èwde nition.‘+-Caution:‘˜ use“of“this“option“will“certainly“break“existingŽ¡�‘WT�‘þU>Ÿ'EŽ‘ãxX‘UUco�Gde!ޤ=Z���‘>Íl3basicsŽŽ‘iM²This–¢;conš¸ãtains“the“basic“de nition“mo�Gdules“used“b˜y“the“other“pac˜k‘ÿqÇages.Ž¡���‘>Íl3c�®9hkŽŽ‘]1¾²A‘8›mo�Gdule–8ãthat“proš¸ãvides“functionalit˜y“comparable“to“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX's“Î\newcommandޤ �‘W²and–S)Î\renewcommand²,‘S˜and“also“the“extra“levš¸ãel“of“c˜hec˜king“describšGed“ab˜o•¸ãv“eŽ¡�‘Win–UUsection“5.1.ŽŽŸ�’åÿ11ŽŽŒ‹ vö y� ý£ ?� ýä���‘>Íl3tlpŽŽ‘Yÿø²This–úimplemenš¸ãts“a“basic“data-t˜yp�Ge,›Lccalled“a“Ìtoken-list‘I¼p‘ÿ}'ointer²,˜used“forޤ �‘Wstoring– /named“tokš¸ãen“lists:‘M4these“are“essen˜tially“T�‘þU>Ÿ'EŽ‘ãxX“macros“with“no“argu-Ž¡�‘Wmen�¸ãts.ޤ;Ú���‘>Íl3expanŽŽ‘i§²This–UUis“the“argumen�¸ãt“expansion“mošGdule“discussed“ab˜o•¸ãv“e.Ž¡���‘>Íl3quarkŽŽ‘hÌd²A‘ï`quark'–ÿis“a“command“that“is“de ned“to“expand“to“itself‘Ç!‘]UThereforeޤ �‘Wthey–+ümš¸ãust“nev˜er“b�Ge“expanded“as“this“will“generate“in nite“recursion;‘9ÄtheyŽ¡�‘Wdo›ûÆho•¸ãw“ev“er˜ha“v“e˜man“y˜uses,‘ ¯e.g.,˜as˜sp�Gecial˜mark“ers˜and˜delimiters˜withinŽ¡�‘Wco�Gde.ޤ;Ú���‘>Íl3seqŽŽ‘[Ò²This–UUimplemenš¸ãts“data-t˜yp�Ges“suc˜h“as“queues“and“stac˜ks.Ž¡���‘>Íl3propŽŽ‘c5K²This–—implemenš¸ãts“the“data-t˜ypšGe“for“`prop˜ert�¸ãy“lists'“that“are“used,‘èinŽ© �‘Wparticular,–UUfor“storing“k�¸ãey/v‘ÿqÇalue“pairs.Ž¡���‘>Íl3in�®9tŽŽ‘Y®1²This–UUimplemenš¸ãts“the“in˜teger“and“`fak˜e“in˜teger'“data-t˜yp�Ges.Ž¡���‘>Íl3toksŽŽ‘`Å¥²A–UUdata-t�¸ãypšGe“corresp˜onding“to“T�‘þU>Ÿ'EŽ‘ãxX's“primitivš¸ãe“tok˜en“registers.Ž¡���‘>Íl3ioŽŽ‘T㈲A–UUmo�Gdule“proš¸ãviding“lo˜w“lev˜el“input“and“output“functions.Ž¡���‘>Íl3precomŽŽ‘pÈÕ²A‘#ç`pre-compilation'–$^mo�Gdule“that“pro�¸ãvides“functions“dealing“withަ�‘Wp�Goin�¸ãter–-'creation“and“handling,‘50and“using“external“ les“to“record“the“stateަ�‘Wof–UUthe“curren�¸ãt“de nitions.ŽŸwµ�‘>This–÷Kdistribution“will“also“conš¸ãtain“the“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX“source“for“the“latest“v˜ersion“of“thisަ�‘>došGcumen�¸ãt,–UUa“do˜cstrip“install“ le“and“three“small“test“ les.ަ�‘MIn–rólater“releases“w�¸ãe“plan“to“add“further“mo�Gdules“and“a“full- edged“exampleަ�‘>of–÷describšGed–¤@in“the“article“`Language“Information“in“Structured“Do˜cumen�¸ãts:‘�Aަ�‘>Mo�Gdel–UUfor“Mark-up“and“Rendering'“[�5Ž‘].ŽŸ ½Q�‘>ËReferencesŽŸç���‘>²[1]ŽŽ‘MŽ;Donald‘Ú¨E‘Ú†Kn�¸ãuth›ü?ÌThe‘�T�‘þKß'EŽ‘Í-Xb–ÿ}'o“ok².˜Addison-W–ÿ*ªesley“,–ûýReading,“Massac•¸ãh“usetts,ަ�‘MŽ;1984.Ž¡���‘>[2]ŽŽ‘MŽ;Go�Gossens,‘‹8Mittelbac�¸ãh–X°and“Samarin.›ÓÌThe–«zL�Ÿýé›�‘üQíó(t}\Êcmti7ÓAŽŽ‘ÙÌT�‘þKß'EŽ‘Í-X“Comp‘ÿ}'anion².˜Addison-W–ÿ*ªesley“,ަ�‘MŽ;Reading,›UUMassac•¸ãh“usetts,˜1994.Ž¡���‘>[3]ŽŽ‘MŽ;Leslie‘e»Lamp�Gort.‘ŸÍÌL�Ÿýé›�‘üQíÓAŽŽ‘ÙÌT�‘þKß'EŽ‘Í-X:‘·ÂA‘¢ùDo–ÿ}'cument›¢ýPr“ep“ar“ation˜System².‘ŸÍAddison-W–ÿ*ªesley“,ަ�‘MŽ;Reading,›UUMassac•¸ãh“usetts,˜second˜edition,˜1994.Ž¡���‘>[4]ŽŽ‘MŽ;F‘ÿ*ªrank–‰qMittelbacš¸ãh“and“Chris“Ro˜wley‘ÿ*ª.› 9The“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX3“Pro‘Ž8ject.˜ÌTUGb–ÿ}'o“at²,‘–x?????ަ�‘MŽ;???‘qÇ1998.Ž¡���‘>[5]ŽŽ‘MŽ;F‘ÿ*ªrank– oMittelbacš¸ãh“and“Chris“Ro˜wley‘ÿ*ª.‘“�Language“Information“in“Structuredަ�‘MŽ;Do•Gcumen�¸ãts:‘ÄÉA‘~‰Mo“del–~Öfor“Mark-up“and“Rendering.‘å�ÌTUGb–ÿ}'o“at²,‘É6?????‘îJ???ަ�‘MŽ;1998.ŽŽŸ�’åÿ12ŽŽŒø…õƒ’À;èy— ó(t}\Êcmti7ó'F C– cmbxti10ó&Æs6‘cmss8ó%ÂÖN  cmbx12ó$Œ-ø cmcsc10ó#ßê cmmi10óKñ`y cmr10óÙ“ Rcmr7ù‘×ßßßßßß