ICE Example: Dynamic ICE Service
Upon submit of the HTML form rendered by the static ICE service, an ICE dynamic, native service counts down from ninety-nine vessels of the selected beverage:
MAPPER (ICE Native Service)
vesselType.Object Name: BOB_PROC * *====================================================================. @001:() . Entry point called by The Cool ICE Service Handler @ rnm -8 . Result -8 contains Service Input Parameters @ rsr,-8 001 . Get Input Parameters @. START BOB ****************************************************************** @ldv <bevg>s15=<beverageType> . @ldv <plural>s12=<vesselType> . @ldv <singlr>s12 . @if <plural> EQ 'bottles',(0002),'kegs',(0003),'shots',(0004) ; . @if <plural> EQ 'jugs',(0005),'glasses',(0006), ; . @if <plural> EQ 'thimbles',(0007),'boxes',(0008) ; . @0002: ldv <singlr>='bottle' gto 0009 . @0003: ldv <singlr>='keg' gto 0009 . @0004: ldv <singlr>='shot' gto 0009 . @0005: ldv <singlr>='jug' gto 0009 . @0006: ldv <singlr>='glass' gto 0009 . @0007: ldv <singlr>='thimble' gto 0009 . @0008: ldv <singlr>='box' . @0009: . @ldv <vessel>s12=<plural> . @ldv <n>i2=99 . @. END BOB ****************************************************************** @ brk,0,f,,y . Start HTML Output Area @. Following is your HTML Document <HTML> <HEAD> <TITLE>Ninety-Nine BOB Output</TITLE> </HEAD> <BODY <%<DocBgClr> <DocBgImg> <TextClr> <LinkClr> <VLinkClr> <ALinkClr>%>> @. HTML Page Header @0010: . <%<n>(p) <vessel>(p) of <bevg>(p) on the wall, <n>(p) <vessel>(p) of <bevg>(p)%>,<BR> @if <n> GT 0 . ;gto 0020 ;. @dec <n> if <n> = 0,(0020) ;if <n> = 1 ldv <vessel>=<singlr> ;. <%Take 1 down, pass it around, <n>(p) <vessel>(p) of <bevg>(p) on the wall.%><BR><BR> @gto 0010 . @0020: . <%Take 1 down, pass it around, no more <plural>(p) of <bevg>(p) on the wall.%><BR> </BODY> </HTML> @. @ brk . End HTML Output Area @ return . Return to The Cool ICE Service Handler