% % stack: raw-caption post-space pre-space % dup 1 left asc 0x1F and % % stack: raw-caption post-space double num % dup dup 1 ge exch 9 le and % % stack: raw-caption post-space double num in-range % "inrange" log)( { % % is valid character, this is tem % % stack: raw-caption post-space double num % !Shooter.Tem % % stack: raw-caption post-space double % 1 right asc dup 0xF0 and 0x30 eq % % stack: raw-caption post-space right-code is-digit % "isdigit" log)( { % % the right character is digit % 0x0F and dup dup 1 ge exch 8 le and % % stack: raw-caption post-space num in-range % "diginr" log)( { % % stack: raw-caption post-space num % % is valid digit, this is color % _Arching.Otype zero { pop 0 !Shooter.Color } { !Shooter.Color } ifelse pop2nd trim % % stack: post-space % } { % % stack: raw-caption post-space num % % not proper number, send a menu % pop2 _Arching.Ptype !Shooter.Tem trim length positive { true !Shooter.ValidCap } { pop "Need Caption" false !Shooter.ValidCap } ifelse % % stack: adj-or-need-cap % } ifelse } { % % stack: raw-caption post-space right-code % % this is not digit % false !Shooter.ValidCap _Arching.Ptype !Shooter.Tem pop2 trim length positive { true !Shooter.ValidCap } { pop "Need Caption" false !Shooter.ValidCap } ifelse % % stack: adj-or-need-cap % } ifelse } { % % stack: raw-caption post-space double num % % not proper letter, send a menu % false !Shooter.ValidCap pop3 _Arching.Ptype !Shooter.Tem trim length positive { true !Shooter.ValidCap } { pop "Need Caption" false !Shooter.ValidCap } ifelse % % stack: adj-or-need-cap % } ifelse