rem Written by Brian Ott & Hans Winkler rem sequence.cdl rem :start GETMENU "Choose type of sequence: (1,2,3) (A,B,C) (A1,A2,A3)","Numeric", "Alpha", "Alph-Prfx",\ "-", "-", "-", "-", "-", "Prog Info" if ((@key == -3) || (@key == -2)) goto exit if (@key == -1) goto exit if (@key == 1) goto numeric if (@key == 2) goto alpha if (@key == 3) goto alphapre if ((@key > 3) && (@key < 9)) goto start if (@key == 9) reg_code = 1 if (@key == 9) goto reg_screen :numeric count = 0 :num1 GETINT "Enter the starting number in the sequence:",1,seq if (@key == -2) goto start if (@key == -3) goto exit :num2 GETINT "Enter the number of items in the sequence:",2,num if (@key == -2) goto num1 if (@key == -3) goto exit :num3 GETFLT "Enter the X step over (Delta X) distance:",0,xstep if (@key == -2) goto num2 if (@key == -3) goto exit :num4 GETFLT "Enter the Y step over (Delta Y) distance:",-.25,ystep if (@key == -2) goto num3 if (@key == -3) goto exit GETPOS "Select position of first item:",1 if (@key == -2) goto num4 if (@key == -3) goto exit x1 = @xworld y1 = @yworld z1 = @zworld :print SPRINT $st,"%i",seq NNOTE x1,y1,z1,$st x1 = x1 + xstep y1 = y1 + ystep seq = seq + 1 count = count + 1 if (count == num) goto exit goto print :alpha $let = "A" $form = "%c" count = 0 :alpha1 GETSTR "Enter the starting letter(s) in the sequence (A - ZZ):",$let,$let if (@key == -2) goto start if (@key == -3) goto exit if ($let[0] < 65) goto leterror if (($let[0] > 90) && ($let[0] < 97)) goto leterror if ($let[0] > 122) goto leterror if (($let[1] != 0) && ( $let[1] != $let[0])) goto dblerror if ($let[1] == $let[0]) $form = "%c%c" :alpha2 GETINT "Enter the number of items in the sequence:",2,num if (@key == -2) goto alpha1 if (@key == -3) goto exit :alpha3 GETFLT "Enter the X step over (Delta X) distance:",0,xstep if (@key == -2) goto alpha2 if (@key == -3) goto exit :alpha4 GETFLT "Enter the Y step over (Delta Y) distance:",-.25,ystep if (@key == -2) goto alpha3 if (@key == -3) goto exit GETPOS "Select position of first item:",1 if (@key == -2) goto alpha4 if (@key == -3) goto exit x1 = @xworld y1 = @yworld z1 = @zworld :alphaprint SPRINT $st,$form,$let[0],$let[0] NNOTE x1,y1,z1,$st x1 = x1 + xstep y1 = y1 + ystep $let[0] = $let[0] + 1 if (($let[0] == 91) && ($form[2] != 0)) goto endseq if (($let[0] == 123) && ( $form[2] != 0)) goto endseq if ($let[0] == 91) $form = "%c%c" if ($let[0] == 91) $let[0] = 65 if ($let[0] == 123) $form = "%c%c" if ($let[0] == 123) $let[0] = 97 count = count + 1 if (count == num) goto exit goto alphaprint :leterror pause "Must use letters aA thru zzZZ:" goto alpha :dblerror pause "Double characters must be the same" goto alpha :endseq pause "End of sequence (ZZ):" goto start :alphapre count = 0 $pre = "A" :ap1 GETSTR "Enter the letter for prefix:",$pre,$pre if (@key == -2) goto start if (@key == -3) goto exit if ($pre[0] < 65) goto preerror if (($pre[0] > 90) && ($pre[0] < 97)) goto preerror if ($pre[0] > 122) goto preerror :ap2 GETINT "Enter the starting number in the sequence:",1,seq if (@key == -2) goto ap1 if (@key == -3) goto exit :ap3 GETINT "Enter the number of items in the sequence:",2,num if (@key == -2) goto ap2 if (@key == -3) goto exit :ap4 GETFLT "Enter the X step over (Delta X) distance:",0,xstep if (@key == -2) goto ap3 if (@key == -3) goto exit :ap5 GETFLT "Enter the Y step over (Delta Y) distance:",-.25,ystep if (@key == -2) goto ap4 if (@key == -3) goto exit GETPOS "Select position of first item:",1 if (@key == -2) goto ap5 if (@key == -3) goto exit x1 = @xworld y1 = @yworld z1 = @zworld :preprint SPRINT $st,"%c%i",$pre[0],seq NNOTE x1,y1,z1,$st x1 = x1 + xstep y1 = y1 + ystep seq = seq + 1 count = count + 1 if (count == num) goto exit goto preprint :preerror pause "Must use a letter aA thru zZ:" goto alphapre :exit :sec_exit CLEAR count, seq, num, xstep, ystep, x1, y1, z1, $st, $let, $form, $pre exit