Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

EXAMPLE: DCL programming; timing macros - tacc.sub, part 01/01

4 views
Skip to first unread message

svend...@dodo.ssahs.unsw.edu.au

unread,
Sep 6, 1995, 3:00:00 AM9/6/95
to
Submitted-by: svend...@dodo.ssahs.unsw.edu.au
Posting-number: Volume 7, Issue 59
Archive-name: tacc/part01

here is a submission of some DCL code for general distribution.

content: a collection of DCL macros which allow you to measure
the accumulated, rather than the elapsed time, in user
defined logical code blocks. They demonstrate some
powerful abstractions that are encapsulated in a
semantically clear form, that takes little visual
real estate. The principles are easily adaptable to
to other programming tasks.


regards **kurt

$! ------------------ CUT HERE -----------------------
$ v='f$verify(f$trnlnm("SHARE_UNPACK_VERIFY"))'
$!
$! This archive created:
$! Name : TACC
$! By : mark.b...@MVB.SAIC.COM
$! Date : 6-SEP-1995 11:18:02.59
$! Using: VMS_SHARE 8.5-1, (C) 1993 Andy Harper, Kings College London UK
$!
$! Credit is due to these people for their original ideas:
$! James Gray, Michael Bednarek
$!
$! To unpack this archive:
$! Minimum of VMS 4.4 (VAX) / OpenVMS 1.0 (Alpha) is required.
$! Remove the headers of the first part, up to `cut here' line.
$! Execute file as a command procedure.
$!
$! The following file(s) will be created after unpacking:
$! 1. TACC.SUB;1
$!
$ set="set"
$ set symbol/scope=(nolocal,noglobal)
$ f="SYS$SCRATCH:."+f$getjpi("","PID")+";"
$ if f$trnlnm("SHARE_UNPACK") .nes. "" then $ -
f=f$parse("SHARE_UNPACK_TEMP",f)
$ e="write sys$error ""%UNPACK"", "
$ w="write sys$output ""%UNPACK"", "
$ if .not. f$trnlnm("SHARE_UNPACK_LOG") then $ w = "!"
$ if f$getsyi("CPU") .gt. 127 then $ goto start
$ ve=f$getsyi("version")
$ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto start
$ e "-E-OLDVER, Must run at least VMS 4.4"
$ v=f$verify(v)
$ exit 44
$unpack:subroutine!P1=file,P2=chksum,P3=attrib,P4=size,P5=fileno,P6=filetotal
$ if f$parse(P1) .nes. "" then $ goto dirok
$ dn=f$parse(P1,,,"DIRECTORY")
$ w "-I-CREDIR, Creating directory ''dn'"
$ create/dir 'dn'
$ if $status then $ goto dirok
$ e "-E-CREDIRFAIL, Unable to create ''dn' File skipped"
$ delete 'f'*
$ exit
$dirok:
$ x=f$search(P1)
$ if x .eqs. "" then $ goto file_absent
$ e "-W-EXISTS, File ''P1' exists. Skipped"
$ delete 'f'*
$ exit
$file_absent:
$ w "-I-UNPACK, Unpacking ", P5, " of ", P6, " - ", P1, " - ", P4, " Blocks"
$ n=P1
$ if P3 .nes. "" then $ n=f
$ if .not. f$verify() then $ define/user sys$output nl:
$ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT/NOJOURNAL 'f'/OUT='n'
PROCEDURE GetHex(s,p)LOCAL x1,x2;x1:=INDEX(t,SUBSTR(s,p,1))-1;x2:=INDEX(t,
SUBSTR(s,p+1,1))-1;RETURN 16*x1+x2;ENDPROCEDURE;PROCEDURE SkipPartsep LOCAL m;
LOOP m:=MARK(NONE);EXITIF m=END_OF(CURRENT_BUFFER);DELETE(m);EXITIF INDEX(
ERASE_LINE,"-+-+-+-+-+-+-+-+")=1;ENDLOOP;ENDPROCEDURE;
PROCEDURE ProcessLine LOCAL c,s,l,b,n,p;s := ERASE_LINE;c := SUBSTR(s,1,1);s :=
s-c;IF c = "X" THEN SPLIT_LINE; ENDIF;MOVE_HORIZONTAL(-1);l := LENGTH(s);p :=
1;LOOP EXITIF p > l;c := SUBSTR(s,p,1);p := p+1;CASE c FROM ' ' TO '`' ['`']
: COPY_TEXT(ASCII(GetHex(s,p))); p:=p+2;[' ']: p:=p+1;[INRANGE,OUTRANGE]
: COPY_TEXT(c);ENDCASE;ENDLOOP;ENDPROCEDURE;PROCEDURE Decode(b)LOCAL m;
POSITION(BEGINNING_OF(b));LOOP m:=MARK(NONE);EXITIF m=END_OF(b);DELETE(m);
IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+-")=1 THEN SkipPartSep;ELSE ProcessLine;
MOVE_HORIZONTAL(1);ENDIF;ENDLOOP;ENDPROCEDURE;SET(FACILITY_NAME,"UNPACK");SET(
SUCCESS,OFF);SET(INFORMATIONAL,OFF);t:="0123456789ABCDEF";f:=GET_INFO(
COMMAND_LINE,"file_name");o:=CREATE_BUFFER(f,f);Decode(o);WRITE_FILE(o,
GET_INFO(COMMAND_LINE,"output_file"));QUIT;
$ if p3 .eqs. "" then $ goto dl
$ open/write fdl &f
$ write fdl "RECORD"
$ write fdl P3
$ close fdl
$ w "-I-CONVRFM, Converting record format to ", P3
$ convert/fdl='f' 'f'-1 'f'
$ fa=f$getdvi(f$parse(f),"ALLDEVNAM")
$ Pa=f$getdvi(f$parse(P1),"ALLDEVNAM")
$ if fa .eqs. Pa then $ rename &f 'f$parse(P1)'
$ if fa .nes. Pa then $ copy &f 'f$parse(P1)'
$dl: delete 'f'*
$ checksum 'P1'
$ if checksum$checksum .nes. P2 then $ -
e "-E-CHKSMFAIL, Checksum of ''P1' failed."
$ exit
$ endsubroutine
$start:
$!
$ create 'f'
X$`20!`B1`B7`09A`20`B5`B3-hack`20that`20illustrates`20some`20dubious`20poetry
V`20that`20DCL`20is`20capable`20of`20despite`20itself.`20This`20is`20best`20app
Vrised`20in`20132`20columns.
X$`20!`B1`B7`09There`20can`20be`20no`20denial,`20I`20am`20a`20hardcore`20DCL`20
Vhacker;`20this`20is`20a`20neologism`20of`20some`20universal`20programming`20pr
Vinciples.`20There`20is
X$`20!`B1`B7`09a`20whole`20system`20of`20these`20covering`20most`20facets`20of
V`20DCL,`20however`20they`20are`20locked`20up`20in`20a`20proprietary`20system
V`20`26`20will`20never`20be
X$`20!`B1`B7`09added`20to`20the`20memetic`20richness`20of`20VMS/DCL,`20so`20it
V`20goes...`20This`20code`20however`20is`20not`20proprietary`20`26`20is`20wille
Vd`20to`20all`20of`20Humanity,
X$`20!`B1`B7`09I`20assert`20a`20FSF`20GPL`20(Free`20Software`20Foundation`20Gen
Veral`20Public`20License).`20i.e.`20It's`20free`20to`20all`20`26`20sundry`20to
V`20be`20shared`20`26`20enjoyed
X$`20!`B1`B7`09so`20long`20as`20it's`20not`20resold`20`26`20that`20the`20creato
Vr`20attributes`20are`20retained.`20So`20here`20it`20is,`20a`20rosetta`20stone
V`20fragment`20of
X$`20!`B1`B7`09Logically`20Structured`20DCL,`20SHARE`20`26`20ENJOY!!.`20`A9@:FS
VF`B7GPL`20by`20Kurt`20Svendsen,`20August`201995,`20Australia.`20
X$`20!`B1`B7`09`26address:`20sven...@dodo.ssahs.unsw.edu.au`20`7C`7C`20kurt@
Vcia.com.au
X$
X$`20!`B1`B7`09Foundation`20declarations`20`26`20definitions
X$
X$`20NIL`20`09`09:==`20""
X$`20TRUE`09`09:==`20"1"
X$`20FALSE`09`09:==`20"0"
X$`20SEMICOLON`09:==`20";"
X$`20EXCLAMATION`09:==`20"!"
X$`20PERIOD`09:==`20"."
X$
X$`20STACK`09`09==`20EXCLAMATION
X$`20EVENT`09`09==`20PERIOD
X$
X$`20SAY`09`09==`20"write`20sys$output"
X$`20LSD*CL`09==`20"if`20(TRUE)`20then`20$"`09!`B1`B7`20Logically`20Structured
V`20Digital`20Command`20Language
X$
X$`20!`B1`B7`09Our`20autobiography,`20these`20dec*larations`20have`20their`20de
Vfinite`20uses`20in`20larger`20systems,`20many`20games`20are`20interesting`20be
Vcause`20of
X$`20!`B1`B7`09the`20special`20rules`20`26`20limitations,`20treating`20DCL`20as
V`20a`20game,`20then`20it`20is`20a`20*very*`20interesting`20one.
X$`20!`B1`B7`09We`20execute`20some`20implementation`20complexity`20to`20have`20
Vsemantic`20simplicity`20at`20another`20level,`20so`20there`20is`20simplicity
V`20in`20the`20midst
X$`20!`B1`B7`09of`20apparent`20complexity,`20although`20one`20would`20not`20cal
Vl`20this`20"fractalsdcl",`20as`20a`20consequence.
X$
X$`20dec_instance`09==`20LSDCL`20+`20"instance=f$edit(f$environment(""procedure
V""),""trim,UPcase"")"
X$`20dec_self`09==`20LSDCL`20+`20"self=f$element(0,SEMICOLON,instance)"
X$`20dec_selfname`09==`20LSDCL`20+`20"selfname=f$parse(self,,,""name"",""NO_con
Vceal,syntax_only"")"
X$`20dec_info`09==`20LSDCL`20+`20"info=f$fao(""%!AS!AS-I-"",f$fao(""!#(+)!AS"",
V(f$type(DEBUG_set).nes.NIL),NIL,""<DEBUG>""),selfname)"
X$
X$`20!`B1`B7`09This`20is`20an`20appalling`20pun,`20among`20other`20things,`20
V`26`20is`20also`20very`20beautiful.
X$`20!`B1`B7`09"Exceptions`20`26`20Interrupts,`20the`20Operator's`20lot!`20`7E
V`7E`20Old`20Jungle`20Saying"
X$
X$`20self_informing_nature`09:==`20on`20ERROR`20then`20$`20self_informing_natur
Ve
X$`20self_informing_nature
X$
X$`20!`B1`B7`09This`20is`20the`20definitions`20for`20the`20accumulated`20time
V`20of`20a`20module`20or`20code`20block,`20rather`20than`20the`20elapsed`20time
V.
X$`20!`B1`B7`09Thus`20we`20measure`20the`20time`20accumulated`20*purely*`20in
V`20that`20block`20`26`20not`20the`20time`20elapsed`20in`20sub-blocks.
X$`20!`B1`B7`09This`20model`20takes`20in`20account`20of`20the`20day`20`26`20so
V`20is`20universally`20applicable`20without`20glitching,`20it's`20an`20awful`20
Vlot`20of`20seconds`20per
X$`20!`B1`B7`09stack`20entry`20but`20what`20the`20hell`20it`20will`20work`20in
V`20*ALL*`20circumstances`20`26`20allows`20up`20to`20a`20month`20of`20timing`20
Vwhich`20is`20well`20`26`20truly
X$`20!`B1`B7`09a`20safety`20margin`20for`20most`20batch`20jobs...`20If`20we`20s
Vtarted`20adding`20in`20months,`20apart`20from`20blowing`20out`20macro`20length
Vs`20we`20would`20also
X$`20!`B1`B7`09have`20the`20tricky`20problem`20of`20variable`20months`20`26`20l
Veap`20years`20to`20encode`20logic`20for...`20i.e.`20no`20go.`20This`20method
V`20is`20watertight`20for`20a
X$`20!`B1`B7`09month`20of`20timing`20`26`20is`20not`20fazed`20by`20the`20"Round
V`20Midnight"`20problem.
X$`20!`B1`B7`09
X$`20!`B1`B7`09Because`20the`20data`20structures`20are`20global`20symbols,`20th
Ve`20block`20definition`20is`20purely`20logical`20`26`20is`20independent`20of
V`20DCL`20concepts
X$`20!`B1`B7`09like`20command`20level,`20gosubs,`20subroutines`20`26`20the`20li
Vke,`20it`20"logically`20blocks"`20both`20at`20inter-command-level`20`26`20intr
Va-command-level.
X$`20!`B1`B7`09
X$`20!`B1`B7`09tacc`20has`20the`20feature`20of`20indenting`20one`20tab`20per`20
Vpush,`20so`20that`20the`20nesting`20`26`20proof`20of`20concept`20is`20transpar
Vent.`20We`20achieve`20this
X$`20!`B1`B7`09by`20the`20means`20of`20fixed`20data-field`20sizes`20on`20the`20
VTQUANTA`20`26`20ACCUM`20fields`20of`20each`20stack`20element.
X$`20!`B1`B7`09
X$`20!`B1`B7`09DAAS`20`20`7E`20Day`20Accumulated`20As`20Seconds,`09`09T`20`7E
V`20Tenths,`09H`20`7E`20Hundredths`09S`20`7E`20Seconds`09"p"`20`7E`20TQUANTA`20
V(CTAAQ)
X$`20!`B1`B7`09CTAAS`20`7E`20Current`20Time`20Accumulated`20As`20Seconds,`09R
V`20`7E`20Raw,`09C`20`7E`20Cooked`09Q`20`7E`20Quanta`09"a"`20`7E`20Accumulated
V`20quantas
X$`20!`B1`B7
X$`20!`B1`B7`09The`20structure`20of`20tacc`20stack`20is:`20`B5`20`AB-`BB`20...
V`20p`B3`B7a`B3`7Cp`B2`B7a`B2`7Cp`B9`B7a`B9`7Cp`B0`B7a`B0`7C`20where`20each`20s
Vtack`20element`20contains`20a`20field`20for`20the
X$`20!`B1`B7`09current`20time`20rendered`20as`20quantas`20`26`20the`20accumulat
Ved`20time`20in`20the`20block`20in`20quantas.`20These`20are`20meant`20to`20help
V`20you`20understand
X$`20!`B1`B7`09the`20ins`20`26`20outs`20of`20the`20lexical`20definitions,`20the
V`20notation`20is`20meant`20to`20be`20intuitive`20but`20not`20rigorous.
X$`20!`B1`B7`09
X$`20!`B1`B7`09
X$`20!`B1`B7`09initialize:`09`B5`20`AB-`09(p`B0`20`AB-`20TQUANTA)`B7(a`B0`20`AB
V-`20`D8)`7C
X$`20!`B1`B7`09push:`09`09`B5`20`AB-`09(p`B9`20`AB-`20TQUANTA)`B7(a`B9`20`AB-
V`20`D8)`7C(p`B0`20`AB-`20p`B0)`B7(a`B0`20`AB-`20((TQUANTA`20-`20p`B0)`20+`20a
V`B0))(`B5`20-`20(p`B0`B7a`B0))
X$`20!`B1`B7`09pop:`09`09`B5`20`AB-`09(p`B0`20`AB-`20TQUANTA)`20+`20(`B5`20-`20
V(p`B9`B7a`B9`7Cp`B0))
X$`20!`B1`B7`09
X$`20!`B1`B7`09Alternately`20the`20structure`20of`20tacc`20stack`20from`20a`20r
Vecord`20POV`20is:`20`B5`20`AB-`BB`20...`B5`B3`7C`B5`B2`7C`B5`B9`7C`B5`B0`20whe
Vre`20`B5`B0`20`AB-`BB`20p`B0`B7a`B0,`20these`20are
X$`20!`B1`B7`09the`20definitions`20rendered`20in`20such`20form,`20for`20a`20sli
Vghtly`20different`20perspective.`20It`20*may*`20make`20things`20clearer,`20aga
Vin
X$`20!`B1`B7`09the`20notation`20is`20more`20poetic`20than`20rigorous,`20however
V`20it`20is`20meant`20to`20elucidate`20the`20DCL`20structures.
X$`20!`B1`B7`09
X$`20!`B1`B7`09initialize:`09`B5`20`AB-`09(`B5`B0`5Ep`20`AB-`20TQUANTA)(`B5`B0
V`5Ea`20`AB-`20`D8)
X$`20!`B1`B7`09push:`09`09`B5`20`AB-`09(`B5`B9`5Ep`20`AB-`20TQUANTA)(`B5`B9`5Ea
V`20`AB-`20`D8)(`B5`B0`5Ep`20`AB-`20`B5`B0`5Ep)(`B5`B0`5Ea`20`AB-`20(TQUANTA`20
V-`20`B5`B0`5Ep`20+`20`B5`B0`5Ea))(`B5`20-`20`B5`B0)`09
X$`20!`B1`B7`09pop:`09`09`B5`20`AB-`09(`B5`B0`5Ep`20`AB-`20TQUANTA)`20+`20(`B5
V`20-`20(`B5`B9`20+`20`B5`B0`5Ep))
X$`20!`B1`B7`09
X$`20!`B1`B7`09Hopefully`20between`20these`20two`20notations`20you`20should`20b
Ve`20able`20to`20nut`20out`20what`20the`20constructs`20are`20doing!
X$`20!`B1`B7`09
X$`20!`B1`B7`09These`20definitions`20allow`20for`20the`20calculation`20`26`20fo
Vrmatting`20of`20the`20current`20time`20in`20various`20Time`20Quanta`20sizes
X$`20!`B1`B7`09They`20have`20to`20be`20declared`20global`20due`20how`20they`20a
Vre`20invoked`20in`20the`20macros,`20with`20deft`20adjustment`20to`20the`20macr
Vos
X$`20!`B1`B7`09you`20can`20get`20away`20with`20declaring`20them`20local,`20this
V`20is`20left`20as`20an`20exercise`20for`20the`20reader.
X$
X$`20tacc_DAAS`09==`20f$string(31*24*60*60*1)
X$`20tacc_DAAT`09==`20f$string(31*24*60*60*10)
X$`20tacc_DAAH`09==`20f$string(31*24*60*60*100)
X$`20tacc_DAAU`09==`20f$string(31*24*60*60*1000)`09!`B1`B7`20This`20is`20to`20t
Vest`20the`20code`20for`20the`20display`20macros`20"UNKNOWN"
X$
X$`20tacc_RCTAAS`09==`20"f$cvtime(,,""day"")*86400`09+f$cvtime(,,""hour"")*3600
V`09+f$cvtime(,,""minute"")*60"+-
X`09`09`20`20`20"+f$cvtime(,,""second"")*1`09+f$cvtime(,,""hundredth"")/50"
X$`20tacc_RCTAAT`09==`20"f$cvtime(,,""day"")*864000`09+f$cvtime(,,""hour"")*360
V00`09+f$cvtime(,,""minute"")*600"+-
X`09`09`20`20`20"+f$cvtime(,,""second"")*10`09+f$cvtime(,,""hundredth"")/10"
X$`20tacc_RCTAAH`09==`20"f$cvtime(,,""day"")*8640000`09+f$cvtime(,,""hour"")*36
V0000`09+f$cvtime(,,""minute"")*6000"+-
X`09`09`20`20`20"+f$cvtime(,,""second"")*100`09+f$cvtime(,,""hundredth"")"
X$`20tacc_RCTAAU`09==`20"f$cvtime(,,""day"")*86400000+f$cvtime(,,""hour"")*3600
V000`09+f$cvtime(,,""minute"")*60000"+-
X`09`09`20`20`20"+f$cvtime(,,""second"")*1000+f$cvtime(,,""hundredth"")*10"
X$
X$`20!`B1`B7`09These`20two`20datums`20determine`20at`20what`20level`20of`20gran
Vularity`20the`20time`20quanta`20operates,`20Like`20all`20measuring`20devices
V`20it`20affects
X$`20!`B1`B7`09the`20object`20it`20measures,`20this`20is`20very`20noticeable`20
Vin`20the`20hundredths`20model`20`26`20worthy`20of`20note`20in`20the`20tenths
V`20model.`20The`20affect
X$`20!`B1`B7`09is`20not`20so`20noticeable`20in`20the`20seconds`20model.`20TQUAN
VTA`20does`20a`20test`20on`20the`20relative`20days`20to`20account`20for`20inter
V-month`20transitions.
X$
X$`20tacc_DAAQ`09`09==`20tacc_DAAS
X$`20tacc_RQUANTA`09`09==`20tacc_RCTAAS
X$
X$`20tacc_TQUANTA`09`09==`20"f$fao(""!#(+)UL"",(f$cvtime(""today"",,""day"").gt
V.f$cvtime(""yesterday"",,""day"")),"`20+-
X`09`09`09`09f$string(f$cvtime(""yesterday"",,""day"")*tacc_DAAQ)`20+`20",0)*1
V`20+"`20+`20tacc_RQUANTA
X$`20tacc_TQUANTA_size`09==`20f$string(1`20+`20f$length(tacc_DAAQ))
X$`20tacc_INDENT_size`09==`20"((f$length(tacc_stack)-2)/(2*tacc_TQUANTA_size)-1
V)"
X$`20tacc_UNIT_size`09==`20"f$fao(""!0UL!1%Cunits!10%Ctenths!100%Chundredths!%E
VUNKNOWN`20UNITS!%F"",(tacc_DAAQ/tacc_DAAS))"
X$
X$`20!`B1`B7`09now,`20give`20or`20take,`20the`20maximum`20size`20of`20a`20symbo
Vl`20in`20DCL`20is`20about`201002`20characters`20which`20is`20pretty`20much`20t
Vhe`20scope`20we`20have
X$`20!`B1`B7`09for`20constructing`20one`20liners`20such`20as`20these.`20But`20t
Vhe`20command`20line`20buffer`20is`20256`20or`20512`20(?)`20`26`20so`20sometime
Vs`20we`20have`20to`20build
X$`20!`B1`B7`09over`20two`20lines.`20This`20one`20is`20about`20764`20characters
V`20long`20which`20is`20almost`20pushing`20the`20limit,`20remember`20that`20"ta
Vcc_TQUANTA"
X$`20!`B1`B7`09takes`20up`20a`20lot`20of`20the`20real`20estate.`20Unlike`20the
V`20famous`20code`20fragment`20from`20V6`20unix`20of`20many`20years`20ago,`20yo
Vu`20are`20meant`20to
X$`20!`B1`B7`09understand`20this`20code,`20if`20I`20systematically`20`26`20meth
Vodically`20explained`20the`20code,`20a`20book`20would`20soon`20result,`20have
V`20fun!!
X$`20!`B1`B7`09
X$`20!`B1`B7`09`09`09`09/*`20You`20are`20not`20expected`20to`20understand`20thi
Vs`20*/
X$`20!`B1`B7`09
X$`20!`B1`B7`09`09`09`09if`20(rp->`20p_flag`20`26`20SSWAP)`20`7B
X$`20!`B1`B7`09`09`09`09`09rp`20->`20p_flag`20=`26`20`7ESSWAP;
X$`20!`B1`B7`09`09`09`09`09aretu`20(u.u_ssav);
X$`20!`B1`B7`09`09`09`09`09`7D
X$`20!`B1`B7`09
X$`20!`B1`B7`09`09`09lines`202240-2243;`20Sixth`20Edition`20`A9`20Western`20Ele
Vctric`20Co.;
X$`20!`B1`B7`09`09`09the`20comment`20is`20line`202238
X$
X$`20tacc_init`09==`20LSDCL`20+`20"tacc_stack`20==`20f$fao(""!#ZL"",`26tacc_TQU
VANTA_size,"+tacc_TQUANTA+")"+-
X`09`09"+(EVENT+f$fao(""!#*0"",`26tacc_TQUANTA_size)+STACK)"
X$
X$`20tacc_push_head`09==`20LSDCL+"tacc_stack==f$fao(""!#ZL"",`26tacc_TQUANTA_si
Vze,"+tacc_TQUANTA+-
X`09`09`09`09")+(EVENT+f$fao(""!#*0"",`26tacc_TQUANTA_size)+STACK)+"`20+-
X`09`09`09`09"f$element(0,EVENT,f$element(0,STACK,tacc_stack))"`20+-
X`09`09`20`09`09"+EVENT+f$fao(""!#ZL"",`26tacc_TQUANTA_size,"
X$`20tacc_push_tail`09==`20tacc_TQUANTA`20+`20"-f$element(0,EVENT,f$element(0,S
VTACK,tacc_stack))*1"+-
X`09`09`09`09"+f$element(1,EVENT,f$element(0,STACK,tacc_stack))*1)"+-
X`20`20`09`09`09`09"+(tacc_stack-f$element(0,STACK,tacc_stack))"
X$`20tacc_push`09`09==`20tacc_push_head`20+`20tacc_push_tail
X$
X$`20tacc_pop`09`09==`20LSDCL`20+`20"tacc_stack`20==`20f$fao(""!#ZL"",`26tacc_T
VQUANTA_size,"`20+`20tacc_TQUANTA`20+-
X`09`09`09`09")`20+`20(tacc_stack`20-`20f$element(0,STACK,tacc_stack)`20-`20STA
VCK`20-`20"`20+-
X`09`09`09`09"f$element(0,EVENT,f$element(1,STACK,tacc_stack)))"
X$
X$`20!`B1`B7`09The`20constructs`20below`20basically`20do`20the`20following`20pi
Veces`20of`20poetic`20pseudo-code.
X$`20!`B1`B7`09show:`09print`20`AB-`20`B5
X$`20!`B1`B7`09now:`09print`20`AB-`20TQUANTA
X$`20!`B1`B7`09read:`09print`20`AB-`20((TQUANTA`20-`20p`B0)`20+`20a`B0)
X$`20!`B1`B7`09store:`09t`AA`20`AB-`20((TQUANTA`20-`20p`B0)`20+`20a`B0)
X$`20!`B1`B7`09accum:`09print`20`AB-`20t`AA
X$
X$`20tacc_show`09==`20LSDCL`20+`20"say`20f$fao(""!#(_)!ASTACCSTACK,`20!AS"","+t
Vacc_INDENT_size+",info,tacc_stack)"
X$`20tacc_now`09==`20LSDCL`20+`20"say`20f$fao(""!#(_)!ASTACCOPALYPSENOW,`20the
V`20time`20as`20!AS`20of`20a`20second`20is`20!"+tacc_TQUANTA_size+-
X`09`09`09"ZL"","+tacc_INDENT_size+",info,"+tacc_UNIT_size+",("`20+`20tacc_TQUA
VNTA`20+`20"))"
X$`20tacc_wait`09==`20LSDCL`20+`20"say`20f$fao(""!#(_)!ASWAITING,`20"","`20+`20
Vtacc_INDENT_size`20+`20",info),"
X$`20tacc_read`09==`20LSDCL`20+`20"say`20f$fao(""!#(_)!ASTIMACCU,`20time`20accu
Vmulated`20as`20!AS`20of`20a`20second`20is`20!"+tacc_TQUANTA_size+"ZL"","+-
X`20`20`09`09`09tacc_INDENT_size+",info,"+`20tacc_UNIT_size+",("`20+`20tacc_TQU
VANTA`20+-
X`09`09`09"-`20f$element(0,EVENT,f$element(0,STACK,tacc_stack))*1"+-
X`09`09`09"+`20f$element(1,EVENT,f$element(0,STACK,tacc_stack))*1))"
X$`20tacc_store`20==`20LSDCL`20+`20"tacc_accumulated`20==`20`20f$fao(""!"+tacc_
VTQUANTA_size+"ZL"",("`20+`20tacc_TQUANTA`20+-
X`09`09"-`20f$element(0,EVENT,f$element(0,STACK,tacc_stack))*1`20+`20f$element(
V1,EVENT,f$element(0,STACK,tacc_stack))*1))"
X$`20tacc_accum`09==`20LSDCL`20+`20"say`20f$fao(""!#(_)!ASACCUMULATED,`20the`20
Vaccumulated`20time`20as`20!AS`20of`20a`20second`20is`20!#ZL"","+-
X`09`09tacc_INDENT_size+",info,"+tacc_UNIT_size+",`26tacc_TQUANTA_size,`26tacc_
Vaccumulated)"
X$
X$`20!`B1`B7`09`09`09`09<Patches`20to`20patches,`20bugs`20to`20bugs,`20code`20w
Vithout`20end,`20amen.>
X$
X$`20!`B1`B7`09The`20presentation`20version`20of`20these`20particular`20timing
V`20mechanisms,`20this`20gives`20them`20a`20run`20through.
X$
X$`20dec_instance
X$`20dec_self
X$`20dec_selfname
X$`20dec_info
X$
X$`20tacc_init
X$`20tacc_show
X$
X$`20tacc_wait`20"1`20second"
X$`20wait`20::1.00
X$
X$`20tacc_now
X$`20tacc_read
X$
X$`20tacc_push
X$`20tacc_show
X$
X$`09tacc_wait`20"2`20seconds"
X$`09wait`20::2.00
X$
X$`09tacc_now
X$`09tacc_read
X$
X$`09tacc_push
X$`09tacc_show
X$
X$`09`09tacc_wait`20"3`20seconds"
X$`09`09wait`20::3.00
X$
X$`09`09tacc_now
X$`09`09tacc_read
X$
X$`09`09`09tacc_push
X$`09`09`09tacc_show
X$
X$`09`09`09tacc_wait`20"6`20seconds"
X$`09`09`09wait`20::6.00
X$
X$`09`09`09tacc_now
X$`09`09`09tacc_read
X$
X$`09`09`09tacc_push
X$`09`09`09tacc_show
X$
X$`09`09`09`09tacc_wait`20"0`20seconds"
X$`09`09`09`09wait`20::0.00
X$
X$`09`09`09`09tacc_now
X$`09`09`09`09tacc_read
X$
X$`09`09`09`09tacc_pop
X$`09`09`09`09tacc_show
X$
X$`09`09`09tacc_pop
X$`09`09`09tacc_show
X$
X$`09`09tacc_wait`20"3`20seconds"
X$`09`09wait`20::3.00
X$
X$`09`09tacc_now
X$`09`09tacc_read
X$
X$`09`09tacc_pop
X$`09`09tacc_show
X$
X$`09tacc_wait`20"4`20seconds"
X$`09wait`20::4.00
X$
X$`09tacc_now
X$`09tacc_read
X$
X$`09tacc_pop
X$`09tacc_show
X$
X$`20tacc_wait`20"3`20seconds"
X$`20wait`20::3.00
X$
X$`20tacc_now
X$`20tacc_read
X$
X$`20tacc_wait`20"2`20seconds"
X$`20wait`20::2.00
X$
X$`20tacc_now
X$`20tacc_read
X$
X$`20tacc_store
X$`20tacc_accum
X$
X$`20exit:exit!exit
X$
X$`20!`B1`B7`09Here`20is`20a`20example`20of`20the`20output`20from`20the`20code
V`20above,`20the`20indents`20are`20for`20demonstration,`20in`20working`20code
V`20you`20may`20not`20indent.
X$
X%TACC-I-TACCSTACK,`2002214690.00000000!
X%TACC-I-WAITING,`201`20second
X%TACC-I-TACCOPALYPSENOW,`20the`20time`20as`20units`20of`20a`20second`20is`2002
V214691
X%TACC-I-TIMACCU,`20time`20accumulated`20as`20units`20of`20a`20second`20is`2000
V000001
X`09%TACC-I-TACCSTACK,`2002214691.00000000!02214690.00000001!
X`09%TACC-I-WAITING,`202`20seconds
X`09%TACC-I-TACCOPALYPSENOW,`20the`20time`20as`20units`20of`20a`20second`20is
V`2002214693
X`09%TACC-I-TIMACCU,`20time`20accumulated`20as`20units`20of`20a`20second`20is
V`2000000002
X`09`09%TACC-I-TACCSTACK,`2002214693.00000000!02214691.00000002!02214690.000000
V01!
X`09`09%TACC-I-WAITING,`203`20seconds
X`09`09%TACC-I-TACCOPALYPSENOW,`20the`20time`20as`20units`20of`20a`20second`20i
Vs`2002214696
X`09`09%TACC-I-TIMACCU,`20time`20accumulated`20as`20units`20of`20a`20second`20i
Vs`2000000003
X`09`09`09%TACC-I-TACCSTACK,`2002214696.00000000!02214693.00000003!02214691.000
V00002!02214690.00000001!
X`09`09`09%TACC-I-WAITING,`206`20seconds
X`09`09`09%TACC-I-TACCOPALYPSENOW,`20the`20time`20as`20units`20of`20a`20second
V`20is`2002214702
X`09`09`09%TACC-I-TIMACCU,`20time`20accumulated`20as`20units`20of`20a`20second
V`20is`2000000006
X`09`09`09`09%TACC-I-TACCSTACK,`2002214702.00000000!02214696.00000006!02214693.
V00000003!02214691.00000002!02214690.00000001!
X`09`09`09`09%TACC-I-WAITING,`200`20seconds
X`09`09`09`09%TACC-I-TACCOPALYPSENOW,`20the`20time`20as`20units`20of`20a`20seco
Vnd`20is`2002214702
X`09`09`09`09%TACC-I-TIMACCU,`20time`20accumulated`20as`20units`20of`20a`20seco
Vnd`20is`2000000000
X`09`09`09%TACC-I-TACCSTACK,`2002214702.00000006!02214693.00000003!02214691.000
V00002!02214690.00000001!
X`09`09%TACC-I-TACCSTACK,`2002214702.00000003!02214691.00000002!02214690.000000
V01!
X`09`09%TACC-I-WAITING,`203`20seconds
X`09`09%TACC-I-TACCOPALYPSENOW,`20the`20time`20as`20units`20of`20a`20second`20i
Vs`2002214705
X`09`09%TACC-I-TIMACCU,`20time`20accumulated`20as`20units`20of`20a`20second`20i
Vs`2000000006
X`09%TACC-I-TACCSTACK,`2002214705.00000002!02214690.00000001!
X`09%TACC-I-WAITING,`204`20seconds
X`09%TACC-I-TACCOPALYPSENOW,`20the`20time`20as`20units`20of`20a`20second`20is
V`2002214709
X`09%TACC-I-TIMACCU,`20time`20accumulated`20as`20units`20of`20a`20second`20is
V`2000000006
X%TACC-I-TACCSTACK,`2002214709.00000001!
X%TACC-I-WAITING,`203`20seconds
X%TACC-I-TACCOPALYPSENOW,`20the`20time`20as`20units`20of`20a`20second`20is`2002
V214712
X%TACC-I-TIMACCU,`20time`20accumulated`20as`20units`20of`20a`20second`20is`2000
V000004
X%TACC-I-WAITING,`202`20seconds
X%TACC-I-TACCOPALYPSENOW,`20the`20time`20as`20units`20of`20a`20second`20is`2002
V214714
X%TACC-I-TIMACCU,`20time`20accumulated`20as`20units`20of`20a`20second`20is`2000
V000006
X%TACC-I-ACCUMULATED,`20the`20accumulated`20time`20as`20units`20of`20a`20second
V`20is`2000000006
X
X<End`20Of`20File>
$ call unpack TACC.SUB;1 3406146550 "" 29 1 1
$ v=f$verify(v)
$ exit

0 new messages