[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Military time



Reply to note from "Patricia M. Godfrey"  Mon,
12 Jun 2006 17:48:57 -0400

Patricia:

> Don't bother, anybody. Found the solution, just have to refine it.

OK, then don't look at this til you're ready.

XPLeNCODE v2.0
b-gin [UNTITLED]
1) Very succinct: no XS parsing; ASSuMEs that the third value
 of default EU ({<}VAEU3{>}) is ":").[cr|lf][cr|lf];*; Save m
ilitary time (hhmm) to S/G 01 (assumes {<}VAEU3{>}==":")[cr|l
f]{<}SX01,{<}VA$MT{>}{>}[BX_]d mt=1[Q2_]{<}SX02,{<}VA$TM{>}{>
}[BX_]d mt={<}PV01{>}[Q2_];*;[cr|lf]{<}SX01,{<}VA@02:1{>}+{<}
VA@02:2{>}{>}{<}PR@01{>}{<}EX{>}[cr|lf][cr|lf]2) The general{032}
case, for any  (same [VA@] parsing method, with additi
onal, explanatory code):[cr|lf][cr|lf];*; Save military time{032}
(hhmm) to S/G 01 (for any {<}VAEU3{>})[cr|lf]{<}SX01,{<}VA$MT
{>}{>}[BX_]d mt=1[Q2_]{<}SX02,{<}VA$TM{>}{>}[BX_]d mt={<}PV01
{>}[Q2_];*;[cr|lf]{<}SX01,{<}VAEU3{>}{>};*;[cr|lf]{<}SX03,"{<
}SX01,{<}VA@02"+{<}IS01{>}+"1{>}+{<}VA@02"+{<}IS01{>}+"2{>}{>
}"{>};*;[cr|lf][BC_]Hit a key to continue{<}PRS/G 03 = @03{>}
{<}SX00,{<}rk{>}{>}[BC_];*;[cr|lf]{<}PV03{>}{<}PR@01{>}{<}EX{
{062}}[cr|lf][cr|lf]3) The same, more pithily (using XS):[cr|lf][
cr|lf];*; Save military time (hhmm) to S/G 01 (for any {<}VAE
U3{>}; XS method)[cr|lf]{<}SX01,{<}VA$MT{>}{>}[BX_]d mt=1[Q2_
]{<}SX02,{<}VA$TM{>}{>}[BX_]d mt={<}PV01{>}[Q2_];*;[cr|lf]{<}
SX01,{<}VAEU3{>}{>};*;[cr|lf]{<}XS02,01,01,,00{>}{<}SX01,{<}I
S01{>}+{<}IS00{>}{>}{<}PR@01{>}{<}EX{>}[cr|lf][cr|lf]
-nd
XPLeNCODE

Enjoy!

--
Carl Distefano
cld@xxxxxxxx