home *** CD-ROM | disk | FTP | other *** search
- 10 iffl=0thenfl=1:load"dp] dos5.1",8,1
- 11 iffl=1thenfl=2:sys52224:rem (c) by commodore
- 600 fore=0to24:poke54272+e,0:next:poke54296,15:goto3000
- 602 poke54277,58:poke54278,16:poke54273,35:poke54272,134
- 604 poke54276,33:fore=1to100:next:poke54276,16:return
- 3000 rem dfcalc 1.5a program for datafile by mike konshak (c)1986
- 3004 poke53281,0:poke53280,0:print"[158]":open4,4:open3,3:gosub4000
- 3006 rem----dim arrays
- 3008 b$=chr$(32):pi=3.14159265:cr$=chr$(13)
- 3010 fori=1to100:s$=s$+chr$(32):nexti
- 3012 dim f$(31),t%(31),l%(31),rec$(31),sum(17),buf(17)
- 3014 dim f(17),c$(17,15),pc(18),tt$(5),hc$(17):goto3044
- 3016 rem----get
- 3018 geta$:ifa$=""then3018
- 3020 return
- 3022 rem----prompt
- 3024 print"[153] press c[153][146]ont r[153][146]edo s[153][146]tart j[153][146]ump e[153][146]xit[158]"
- 3026 gosub3018:return
- 3028 rem----clear top 13 rows of screen
- 3030 forz=1to13:poke781,z:sys59903:nextz:return
- 3032 rem----disk error
- 3034 input#15,en,em$,et,es:if(en<20)or(en=62)thenet=0:return
- 3036 print" [150]disk error[146]"en"[157], "em$","et"[157],"es"[158]":et=8
- 3038 print" [153]press any key[153][146] to continue[158]"
- 3040 gosub3018:close5:close15:return
- 3042 rem----starting menu
- 3044 print"[158][147] calculated reports program rev 1.5a "
- 3045 print" [158] copyright (c)1986 by mike konshak "
- 3046 print"[153] use o[153][146]ld predefined format"
- 3047 print" or n[153][146]ew format"
- 3048 print" $[153][146] disk directory 4[153][146]"
- 3049 print" q[153][146]uit program"
- 3050 print" transfer to:"
- 3051 print" d[153][146] datafile dbms"
- 3052 print" p[153][146] dfprint reports-lists-labels"
- 3054 print" [158] press the appropriate key [146]"
- 3056 gosub3018:ifa$="q"thenclose3:close4:print"[147]":end
- 3058 ifa$="n"thenk=1:goto3068
- 3059 ifa$="d"thenprint"[147][144]load"chr$(34)"datafile"chr$(34)",8":goto3064
- 3060 ifa$="o"thenk=2:fl=0:goto3068
- 3061 ifa$="p"thenprint"[147][144]load"chr$(34)"dfprint"chr$(34)",8":goto3064
- 3062 ifa$="$"ora$="4"thengosub3940:goto3044
- 3063 gosub602:goto3056
- 3064 print:print:print:print:print"run[158]"
- 3065 poke631,19:poke632,13:poke633,13:poke634,13:poke635,13:poke636,13
- 3066 poke198,6:new:end
- 3067 rem----open datafile, read file structure
- 3068 print"[153][147] available datafile record files are:[158]":@"$0:df]*"
- 3072 print"[153] name of datafile record file?[158]"
- 3074 print" ? "nf$:input"[145] ";a$:ifa$=""then3044
- 3076 ifa$=nf$then3096
- 3078 nf$=a$
- 3080 open15,8,15:open5,8,5,"0:df] "+nf$+",s,r":gosub3034:ifet=8then3044
- 3082 ifen=62thengosub3036:goto3044
- 3084 input#5,r,f,x:gosub3034:ifet=8then3044
- 3088 forn=1tof:input#5,f$(n),l%(n):nextn:gosub3034:ifet=8then3044
- 3090 close5:close15
- 3092 ifk=2then3386
- 3094 rem----define new format
- 3096 ck=1:print"[158][147] define report header format [146]"
- 3098 print"[153] enter width of report (136 max)"
- 3100 print"[158] ? 0[157][157]"pw:input"[145] ";pw:ifpw>136thenprint"[145][145][145][145][145][145][145]":goto3098
- 3102 print"[153] enter number of title lines in the"
- 3104 print" report header (4 lines max)"
- 3106 print"[158] "nl:input"[145] ";nl:ifnl>4thenprint"[145][145][145][145][145][145][145]":goto3102
- 3108 ifnl=0thentt$(1)="[153]no titles":goto3118
- 3110 print:forj=1tonl:print"[153] title #[158]"j:print" ? >[157]"tt$(j)
- 3112 iflen(tt$(j))>37thenprint"[145]";
- 3114 input"[145] ";tt$(j):iftt$(j)=""thentt$(j)=">"
- 3116 nextj
- 3118 gosub3024:ifa$="e"then3044
- 3120 ifa$="j"then3386
- 3122 ifa$="r"ora$="s"then3096
- 3124 rem----print field info for reference
- 3126 print"[147]":fori=1to(22-int(f/2)):printchr$(17);:nexti
- 3128 print"[153] field name(length) data for [158]"nf$
- 3130 oe=1:if(f/2)=int(f/2)thenoe=0:goto3132
- 3132 of=int(f/2):fori=1toof+oe
- 3134 print" "i"[146][153]"f$(i)l%(i);
- 3136 ifoe=1then3140
- 3138 printtab(19)""i+of"[146][153]"f$(i+of)l%(i+of):goto3142
- 3140 ifi+of<fthenprinttab(19)""i+of+1"[146][153]"f$(i+of+1)l%(i+of+1)
- 3142 nexti
- 3144 rem----enter columnar data
- 3146 print"[158] define report columnar format [146]"
- 3148 gosub3030
- 3150 print"[153] calculate the total length of all"
- 3152 print" fields to be included in the report."
- 3154 print" allowing 2 spaces between each"
- 3156 print" column."
- 3158 print" enter the number of columns in report."
- 3160 print" (16 columns max)"
- 3162 print"[158] ? 0[157][157]"nc:input"[145] ";nc:ifnc>16then3148
- 3164 gosub3024:ifa$="e"then3044
- 3166 ifa$="j"then3386
- 3168 ifa$="r"then3148
- 3170 ifa$="s"then3096
- 3172 rem----column position
- 3174 fori=1tonc:gosub3030
- 3176 print"[153] enter position of column [158]"i""
- 3178 print" ? 0[157][157]"pc(i):input"[145] ";pc(i):ifpc(i)=0then3174
- 3180 ifpc(i)>pwthenprint"[145][145]":goto3178
- 3182 nexti
- 3184 gosub3024:ifa$="e"then3044
- 3186 ifa$="j"then3386
- 3188 ifa$="r"then3174
- 3190 ifa$="s"then3096
- 3192 fori=1tonc:gosub3030
- 3194 rem----column heading
- 3196 print"[153] enter heading of column [158]"i
- 3198 print"[153] heading is [158]";:ifi=ncthenprintpw-pc(i);:goto3202
- 3200 printpc(i+1)-2-pc(i);
- 3202 print"[146] [153]characters wide"
- 3204 print"[158] ? >[157]"hc$(i):input"[145] ";hc$(i):ifhc$(i)="r"then3192
- 3206 nexti
- 3208 gosub3024:ifa$="e"then3044
- 3210 ifa$="j"then3386
- 3212 ifa$="r"then3192
- 3214 ifa$="s"then3096
- 3216 rem----column contents data
- 3218 fori=1tonc:print" [158] format input routines for column"i
- 3220 gosub3030:print"[153] enter contents of column [158]"i
- 3222 print"[153] choose f[153][146]ield data in records"
- 3224 print" e[153][146]quation"
- 3225 print" r[153][146]unning total (balance)"
- 3226 print" #[153][146] record number"
- 3228 print"[158] ? f[157]"left$(c$(i,1),1):input"[145] ";c$:c$(i,1)=c$+mid$(c$(i,1),2)
- 3230 ifc$="#"thenc$(i,1)="#":c$(i,13)="n":goto3344
- 3232 ifc$="f"then3238
- 3234 ifc$="e"then3260
- 3235 ifc$="r"then3239
- 3236 print"[145][145]":gosub602:goto3228
- 3238 print"[153] which field # will be in column [158]"i:goto3241
- 3239 print"[153] which column # is to have a running"
- 3240 print" total in column [158]"i"[146][157]? [153]enter 1[153][146] thru "i-1:goto3245
- 3241 print"[153] enter 1[153][146] thru "f
- 3242 print"[158] ? "mid$(c$(i,1),2,2):input"[145] ";c$
- 3243 if(val(c$)>f)or(val(c$)<=0)thenprint"[145][145]":goto3242
- 3244 goto3247
- 3245 print"[158] ? "mid$(c$(i,1),2,2):input"[145] ";c$
- 3246 if(val(c$)>i-1)or(val(c$)<=0)thenprint"[145][145]":goto3245
- 3247 c$(i,1)=left$(c$(i,1),1)+c$
- 3248 goto3328
- 3250 gosub3024:ifa$="e"then3044
- 3252 ifa$="j"then3386
- 3254 ifa$="r"then3220
- 3256 ifa$="s"then3096
- 3258 rem----column contents calculation
- 3260 eq=2:op=1:forj=0to3:rs$(j)="":nextj:goto3264
- 3262 eq=eq+4:op=op+1
- 3264 gosub3030:print"[153] enter equation [158]"op"[153][146]for column [158]"i
- 3266 ifop>1thengosub3308
- 3268 print" res[158][146]="rs$(op-1)
- 3270 print"[153] operand x[158]? .[157]"c$(i,eq)
- 3272 print"[153] operator [158]? .[157]"c$(i,eq+1)
- 3274 print"[153] operand y[158]? .[157]"c$(i,eq+2)
- 3276 print""tab(10):inputc$(i,eq)
- 3278 printtab(10):inputc$(i,eq+1)
- 3280 printtab(10):inputc$(i,eq+2)
- 3282 gosub3308:print" res="rs$(op)"[158]":c$(i,14)=rs$(op)
- 3284 gosub3024:ifa$="e"then3044
- 3286 ifa$="j"then3386
- 3288 ifa$="r"then3220
- 3290 ifa$="s"then3096
- 3292 ifeq=10then3328
- 3294 print"[145][153] expand equation? y[153][146] or n[158][146] "
- 3296 print" ? n[157]"c$(i,eq+3):input"[145] ";c$(i,eq+3)
- 3298 ifc$(i,eq+3)="y"then3262
- 3300 :
- 3302 ifc$(i,eq+3)="n"thenforj=eq+4to12:c$(i,j)=".":nextj:goto3328
- 3304 print"[145][145]":goto3294
- 3306 rem----combine operations
- 3308 onopgoto3310,3312,3318
- 3310 rs$(1)=c$(i,2)+c$(i,3)+c$(i,4):goto3324
- 3312 ifc$(i,6)="res"then3316
- 3314 rs$(2)=c$(i,6)+c$(i,7)+"("+rs$(1)+")":goto3324
- 3316 rs$(2)="("+rs$(1)+")"+c$(i,7)+c$(i,8):goto3324
- 3318 ifc$(i,10)="res"then3322
- 3320 rs$(3)=c$(i,10)+c$(i,11)+"("+rs$(2)+")":goto3324
- 3322 rs$(3)="("+rs$(2)+")"+c$(i,11)+c$(i,12)
- 3324 return
- 3326 rem----field totals
- 3328 gosub3030:print"[153] set end-of-column operation"
- 3330 print" options: t[153][146]otal sum of column"
- 3332 print" a[153][146]verage contents of column"
- 3334 print" n[153][146]o operation to column"
- 3336 print"[158] ? n[157]"c$(i,13):input"[145] ";c$(i,13)
- 3338 if(c$(i,13)="t")or(c$(i,13)="a")or(c$(i,13)="n")then3344
- 3340 print"[145][145]":goto3336
- 3342 rem----set justifications
- 3344 gosub3030:print"[153] set column justification
- 3346 [153]" options: lprintwaiteft"
- 3348 [153]" rprintwaitight"
- 3350 [153]" cprintwaiturrency ($.00)"
- 3352 [153]" pprintwaitercent (%)"
- 3354 [153]" dprintwaitecimals to right"
- 3356 [153]"sys ? lcmd"[200](c$(i,0),1):[133]"on ";c$:c$(i,0)[178]c$[170][202](c$(i,0),2)
- 3358 [139](c$[178]"l")[176](c$[178]"r")[176](c$[178]"c")[167]3370
- 3360 [139](c$[178]"p")[176](c$[178]"d")[167]3364
- 3362 [153]"onon":[137]3356
- 3364 [153]"print # of places to the right of decimal:"
- 3366 [153]"sys ? 1cmd"[202](c$(i,0),2,1):[133]"on ";c$
- 3368 c$(i,0)[178][200](c$(i,0),1)[170]c$
- 3370 [141]3024:[139]a$[178]"e"[167]3044
- 3372 [139]a$[178]"j"[167]3386
- 3374 [139]a$[178]"r"[167]3220
- 3376 [139]a$[178]"s"[167]3096
- 3378 [129]j[178]0[164]14:[139]c$(i,j)[178]""[167]c$(i,j)[178]"."
- 3380 [130]j:[130]i
- 3382 fl[178]1
- 3384 [143]----operations menu
- 3386 [153]"load sys calculated reports operations menu wait"
- 3388 [153]"print current datafile: sys"nf$
- 3390 [139]fl[178]1[167][153]" sprintwaitave report format"
- 3392 [153]" lprintwaitoad report format"
- 3394 [139]fl[178]1[167][153]" cprintwaithange report format"
- 3396 [139]fl[178]1[167][153]" pprintwaitrint records"
- 3397 [153]" rprintwaiteconfigure printer, optionsys"p;:[139]p[178]4[167][153]"cmdcmdscreenwait";
- 3398 [153]:[153]" $printwait disk directory 4wait"
- 3400 [153]" ewaitprintxit this datafile"
- 3402 [153]"sys press the appropriate key wait"
- 3404 [141]3018:[139]a$[178]"e"[175]ck[178]0[167]3044
- 3406 [139]a$[178]"s"[167]3430
- 3408 [139]a$[178]"l"[167]3456
- 3410 [139]a$[178]"c"[167]3096
- 3412 [139]a$[178]"p"[167]3496
- 3414 [139]a$[178]"$"[176]a$[178]"4"[167][141]3940:[137]3386
- 3416 [139]a$[178]"e"[175]ck[178]1[167]3420
- 3417 [139]a$[178]"r"[167][141]4000:[137]3386
- 3418 [141]602:[137]3404
- 3420 [153]"on defyou have not saved your new format!!!waitsys"
- 3422 [153]" do you still want to exit? ywait or nwait? "
- 3424 [141]3018:[139]a$[178]"y"[167]3044
- 3426 [137]3386
- 3428 [143]----save report format
- 3430 [153]"print save under what file name?"
- 3432 [153]"sys ? "nf$:[133]"on ";cf$:[139]cf$[178]""[167]3386
- 3434 [153]" saving calculated report format"
- 3436 [159]15,8,15:[152]15,"s0:cr] "[170]cf$:[141]3034:[139]et[178]8[167]3386
- 3438 [159]5,8,5,"0:cr] "[170]cf$[170]",s,w":[141]3034:[139]et[178]8[167]3386
- 3440 [152]5,pw;cr$;nl;cr$;nc:[141]3034:[139]et[178]8[167]3386
- 3442 [129]j[178]1[164]nl:[152]5,tt$(j):[130]j:[141]3034:[139]et[178]8[167]3386
- 3444 [129]i[178]1[164]nc:[152]5,pc(i);cr$;hc$(i):[141]3034:[139]et[178]8[167]3386
- 3446 [129]j[178]0[164]14:[152]5,c$(i,j):[130]j:[141]3034:[139]et[178]8[167]3386
- 3448 [130]i
- 3450 [152]5,"eof"
- 3452 [160]5:[160]15:ck[178]0:[137]3386
- 3454 [143]----load report format
- 3456 [153]"loadprint available calc format files are:sys":@"$0:cr]*"
- 3457 [153]"print load format from what file?sys"
- 3458 [153]" ? "nf$:[133]"on ";cf$:[139]cf$[178]""[167]3386
- 3460 [153]" loading calculated report format"
- 3462 [159]15,8,15:[159]5,8,5,"0:cr] "[170]cf$[170]",s,r":[141]3034:[139]et[178]8[167]3386
- 3464 [139]en[178]62[167][141]3036:[137]3386
- 3466 [132]5,pw,nl,nc:[141]3034:[139]et[178]8[167]3386
- 3468 [129]j[178]1[164]nl:[132]5,tt$(j):[130]j:[141]3034:[139]et[178]8[167]3386
- 3470 [129]i[178]1[164]nc:[132]5,pc(i),hc$(i):[141]3034:[139]et[178]8[167]3386
- 3472 [129]j[178]0[164]14:[132]5,c$(i,j):[130]j:[141]3034:[139]et[178]8[167]3386
- 3474 [130]i
- 3476 [160]5:[160]15
- 3478 fl[178]1:[137]3386
- 3480 [143]----start print process
- 3482 [143]----open datafile channel and position to records
- 3484 [159]15,8,15:[159]5,8,5,"0:df] "[170]nf$[170]",s,r":[141]3034:[139]et[178]8[167]3386
- 3486 [139]en[178]62[167][141]3036:[137]3386
- 3488 [132]5,rr,f,xr:[141]3034:[139]et[178]8[167]3386
- 3490 [129]n[178]1[164]f:[132]5,f$(n),l%(n):[130]n:[141]3034:[139]et[178]8[167]3386
- 3492 [142]
- 3494 [143]----print options menu
- 3496 pg[178]1:[153]"sysload print options menu wait"
- 3500 [153]" aprintwaitll records in file"
- 3502 [153]" fprintwaitind records with common fields"
- 3504 [153]" eprintwaitxit back to start"
- 3506 [153]" position paper at top of page"
- 3508 [153]" sys press the appropriate key "
- 3510 [141]3018:[139]a$[178]"e"[167]3386
- 3512 [139]a$[178]"a"[167]3550
- 3514 [139]a$[178]"f"[167]3520
- 3516 [141]602:[137]3510
- 3518 [143]----find record (search)
- 3520 [153]"loadsys find records with common items "
- 3522 [141]3484
- 3524 [129]n[178]1[164]f:[153]" "n"waitprint "f$(n):[130]n
- 3526 [133]"print which field is to be searchedsys";sf
- 3528 [139]sf[179]0[176]sf[177]f[167][153]"ononon":[137]3526
- 3530 [153]"print enter common itemwait":[153]" (the entire string is not required)"
- 3532 [153]"print "f$(sf)"waitsys ";:[133]t$
- 3534 [153]"load":[141]3568
- 3536 [129]i[178]1[164]xr:[139]p[179][177]4[167][153]" searching record"i"on"
- 3538 [129]n[178]1[164]f:[132]5,rec$(n):[130]n:[141]3034:[139]et[178]8[167]3386
- 3540 [139]t$[178][200](rec$(sf),[195](t$))[167][141]3622
- 3542 [130]i:[141]3662
- 3544 [152]pf,"file: "nf$","k"of"xr"records reported"
- 3545 [160]5:[160]15:[139]p[178]4[167]3565
- 3546 [129]i[178]1[164]60[171]pl:[141]4034:[130]i:[137]3496
- 3548 [143]----print all records
- 3550 [153]"load":[139]p[179][177]4[167][153]" printing heading"
- 3552 [141]3568:[141]3484
- 3554 [153]"on";:[129]i[178]1[164]xr:[139]p[179][177]4[167][153]" reading record #"i"on"
- 3556 [129]n[178]1[164]f:[132]5,rec$(n):[130]n:[141]3034:[139]et[178]8[167]3386
- 3558 [141]3622
- 3560 [130]i:[141]3662
- 3562 [152]pf,"file: "nf$","k"records reported"
- 3563 [160]5:[160]15:[139]p[178]4[167]3565
- 3564 [129]i[178]1[164]60[171]pl:[141]4034:[130]i:[137]3496
- 3565 [153]"press any keywait":[141]3018:[137]3496
- 3566 [143]----begin report/center title
- 3568 pl[178]0:ta[178]0:k[178]0:[129]j[178]1[164]nc:sum(j)[178]0:[130]j
- 3570 [129]j[178]1[164]nc:[139]c$(j,13)[179][177]"n"[167]tl[178]1
- 3572 [130]j:[129]j[178]1[164]nl:[139]tt$(j)[179][177]">"[167][141]3576
- 3574 [130]j:[137]3584
- 3576 m[178][181]((pw[171][195](tt$(j)))[173]2):[139]p[179][177]1[167]3580
- 3578 [152]pf,[200](s$,m)[170]tt$(j);b1$;:pl[178]pl[170]1:[142]
- 3580 [152]pf,[200](s$,m)[170]tt$(j);b1$:pl[178]pl[170]1:[142]
- 3582 [143]----position headings
- 3584 [141]3618:j[178]1:pc(nc[170]1)[178]pw[170]3:cw[178]pc(2)[171]2[171]pc(1)
- 3586 clm$[178]hc$(j)
- 3588 [139]c$(j,0)[178]"l"[167][141]3926:[137]3592
- 3590 [141]3918
- 3592 [139]pc(1)[177]1[167]3596
- 3594 [152]pf,clm$;:[137]3598
- 3596 [152]pf,[200](s$,pc(1)[171]1)[170]clm$;
- 3598 [129]j[178]2[164]nc
- 3600 cw[178]pc(j[170]1)[171]2[171]pc(j):clm$[178]hc$(j)
- 3602 [139]c$(j,0)[178]"l"[167][141]3926:[137]3606
- 3604 [141]3918
- 3606 [152]pf,[200](s$,2)[170]clm$;
- 3608 [130]j
- 3610 [141]4034
- 3612 [141]3618:pl[178]pl[170]3
- 3614 [142]
- 3616 [143]----print dashed line
- 3618 [129]j[178]1[164]pw:[152]pf,"-";:[130]j:[141]4034:[142]
- 3620 [143]----print file data
- 3622 [129]j[178]1[164]nc:buf(j)[178]0:[130]j:k[178]k[170]1:j[178]1
- 3624 pc(nc[170]1)[178]pw[170]3:cw[178]pc(2)[171]2[171]pc(1)
- 3626 [141]3740
- 3628 [141]3708
- 3630 [139]pc(1)[177]1[167]3636
- 3632 [152]pf,clm$;
- 3634 [137]3638
- 3636 [152]pf,[200](s$,pc(1)[171]1)[170]clm$;
- 3638 [129]j[178]2[164]nc
- 3640 cw[178]pc(j[170]1)[171]2[171]pc(j)
- 3642 [141]3740
- 3644 [141]3708
- 3646 [152]pf,[200](s$,2)[170]clm$;
- 3648 [130]j
- 3650 [141]4034
- 3652 pl[178]pl[170]1
- 3654 [143]----check # lines on page
- 3656 [139]pl[178]60[167][129]j[178]1[164]5:[141]4034:[130]j:pl[178]0:[137]3659
- 3658 [142]
- 3659 pg[178]pg[170]1:[152]pf,"page"pg:[141]3584:[137]3658
- 3660 [143]----print totals/averages
- 3662 [141]3618:[139]tl[178]0[167][142]
- 3664 j[178]1:cw[178]pc(2)[171]2[171]pc(1)
- 3666 [139]ta[178]0[167][141]3722:[141]3918:[137]3674
- 3668 [141]3732
- 3670 [139]c$(j,13)[178]"n"[167][141]3918:[137]3674
- 3672 [141]3708
- 3674 [139]pc(1)[177]1[167]3680
- 3676 [152]pf,clm$;
- 3678 [137]3682
- 3680 [152]pf,[200](s$,pc(1)[171]1)[170]clm$;
- 3682 [129]j[178]2[164]nc
- 3684 cw[178]pc(j[170]1)[171]2[171]pc(j)
- 3686 [139]ta[178]0[167][141]3722:[141]3918:[137]3694
- 3688 [141]3732
- 3690 [139]c$(j,13)[178]"n"[167][141]3918:[137]3694
- 3692 [141]3708
- 3694 [152]pf,[200](s$,2)[170]clm$;
- 3696 [130]j
- 3698 [141]4034
- 3700 [139]ta[178]0[167]ta[178]1:[137]3662
- 3702 [141]3618
- 3704 [142]
- 3706 [143]---determine justification
- 3708 [139][200](c$(j,0),1)[178]"l"[167][141]3926:[142]
- 3710 [139][200](c$(j,0),1)[178]"r"[167][141]3918:[142]
- 3712 [139]e[178]1[167][141]3918:[142]
- 3714 [139][200](c$(j,0),1)[178]"c"[167][141]3904:[142]
- 3716 [139][200](c$(j,0),1)[178]"d"[167][141]3906:[142]
- 3718 [141]3934:[142]
- 3720 [143]---determine total/avg label for column
- 3722 [139][200](c$(j,13),1)[178]"n"[167] clm$[178]"":[142]
- 3724 [139][200](c$(j,13),1)[178]"t"[167] clm$[178]"total":[142]
- 3726 [139]cw[179]7[167]clm$[178]"avg":[142]
- 3728 clm$[178]"average":[142]
- 3730 [143]---determine total/avg value for column
- 3732 [139][200](c$(j,13),1)[178]"n"[167] clm$[178]"":[142]
- 3734 [139][200](c$(j,13),1)[178]"t"[167] clm$[178][196](sum(j)):[142]
- 3736 [139]k[179][177]0[167]clm$[178][196](sum(j)[173]k)
- 3737 [142]
- 3738 [143]---determine contents of column
- 3740 [139][200](c$(j,1),1)[178]"#"[167] clm$[178][196](i):[137]3792
- 3742 [139][200](c$(j,1),1)[178]"f"[167] clm$[178]rec$([197]([202](c$(j,1),2,2))):[137]3792
- 3743 [139][200](c$(j,1),1)[178]"r"[167] clm$[178][196](sum([197]([202](c$(j,1),2,2)))):[137]3792
- 3744 [143]----calculations routine
- 3746 res[178]0:eq[178]0
- 3748 eq[178]eq[170]2
- 3750 [143]----operand x
- 3752 [139][200](c$(j,eq),1)[178]"f"[167] x[178][197](rec$([197]([202](c$(j,eq),2,2)))):[137]3762
- 3753 [139]c$(j,eq[170]1)[178]"++"[167] x[178][197]([202](c$(j,2),2,2)):[137]3762
- 3754 [139][200](c$(j,eq),1)[178]"c"[167] x[178]buf([197]([202](c$(j,eq),2,2))):[137]3762
- 3756 [139][200](c$(j,eq),3)[178]"res"[167] x[178]res:[137]3762
- 3758 [139][200](c$(j,eq),2)[178]"pi"[167] x[178]pi:[137]3762
- 3760 [139][200](c$(j,eq),1)[179][177]"."[167] x[178][197](c$(j,eq))
- 3762 eq[178]eq[170]2
- 3764 [143]----operand y
- 3766 [139][200](c$(j,eq),1)[178]"f"[167] y[178][197](rec$([197]([202](c$(j,eq),2,2)))):[137]3776
- 3767 [139]c$(j,eq[171]1)[178]"++"[167] y[178][197]([202](c$(j,4),2,2)):[137]3776
- 3768 [139][200](c$(j,eq),1)[178]"c"[167] y[178]buf([197]([202](c$(j,eq),2,2))):[137]3776
- 3770 [139][200](c$(j,eq),3)[178]"res"[167] y[178]res:[137]3776
- 3772 [139][200](c$(j,eq),2)[178]"pi"[167] y[178]pi:[137]3776
- 3774 y[178][197](c$(j,eq))
- 3776 [141]3800
- 3778 [139]c$(j,eq[170]1)[179][177]"y"[176]e[178]1[167]3788
- 3780 res[178]z
- 3782 [139]eq[178]12[167]3788
- 3784 [137]3748
- 3786 [143]----set value of column/buffers
- 3788 [139]e[178]1[167]clm$[178]"??error??":[137]3792
- 3790 clm$[178][196](z)
- 3792 buf(j)[178][197](clm$)
- 3794 sum(j)[178]sum(j)[170][197](clm$)
- 3796 [142]
- 3798 [143]----basic math operators
- 3800 w[178]eq[171]1
- 3802 e[178]0:z[178]0:c$[178]c$(j,w)
- 3804 [139]c$(j,w)[178]"+"[167] z[178]x[170]y:[142]
- 3805 [139]c$(j,w)[178]"++"[167] z[178]0:[129]h[178]x[164]y:z[178]z[170]buf(h):[130]h:[142]
- 3806 [139]c$(j,w)[178]"-"[167] z[178]x[171]y:[142]
- 3807 [139]c$(j,w)[178]"*"[167] z[178]x[172]y:[142]
- 3808 [139]c$(j,w)[178]"/"[175]y[179][177]0[167] z[178]x[173]y:[142]
- 3809 [139]c$(j,w)[178]"^"[167] z[178]x[174]y:[142]
- 3810 [139]c$(j,w)[178]"sgn"[167] z[178]y[172]([171]1):[142]
- 3811 [143]----logical operators
- 3812 [139]c$(j,w)[178]"="[175]x[178]y[167]z[178]1:[142]
- 3813 [139]c$(j,w)[178]"<"[175]x[179]y[167]z[178]1:[142]
- 3814 [139]c$(j,w)[178]">"[175]x[177]y[167]z[178]1:[142]
- 3815 [139]c$(j,w)[178]"<>"[175]x[179][177]y[167]z[178]1:[142]
- 3816 [139]c$(j,w)[178]"or"[175](x[177]1[176]y[177]1)[167]z[178]1:[142]
- 3817 [139]c$(j,w)[178]"and"[175]x[177]1[175]y[177]1[167]z[178]1:[142]
- 3818 [139]c$[178]"="[176]c$[178]"<"[176]c$[178]">"[176]c$[178]"<>"[176]c$[178]"or"[176]c$[178]"and"[167]z[178]0:[142]
- 3819 [143]----scientific operators
- 3820 [139]c$(j,w)[178]"sqr"[175]y[177][178]0[167] z[178][186](y):[142]
- 3821 [139]c$(j,w)[178]"sin"[167] z[178][191](y):[142]
- 3822 [139]c$(j,w)[178]"cos"[167] z[178][190](y):[142]
- 3824 [139]c$(j,w)[178]"tan"[175][190](y)[179][177]0[167] z[178][192](y):[142]
- 3826 [139]c$(j,w)[178]"atn"[167] z[178][193](y):[142]
- 3828 [139]c$(j,w)[178]"abs"[167] z[178][182](y):[142]
- 3830 [139]c$(j,w)[178]"log"[175]y[177]0[167] z[178][188](y):[142]
- 3832 [139]c$(j,w)[178]"exp"[175][182](y)[179]88[167] z[178][189](y):[142]
- 3834 [139]c$(j,w)[178]"int"[167] z[178][181](y):[142]
- 3836 [139]c$(j,w)[178]"sec"[175][190](y)[179][177]0[167] z[178]1[173][190](y):[142]
- 3838 [139]c$(j,w)[178]"csc"[175][191](y)[179][177]0[167] z[178]1[173][191](y):[142]
- 3840 [139]c$(j,w)[178]"cot"[175][192](y)[179][177]0[167] z[178]1[173][192](y):[142]
- 3842 [139]c$(j,w)[178]"asn"[175]([171]y[172]y[170]1)[177]0[167] z[178][193](y[173][186]([171]y[172]y[170]1)):[142]
- 3844 [139]c$(j,w)[178]"aco"[175]([171]y[172]y[170]1)[177]0[167] z[178][171][193](y[173][186]([171]y[172]y[170]1))[170]pi[173]2:[142]
- 3846 [139]c$(j,w)[178]"asc"[175](y[172]y[171]1)[177]0[167] z[178][193](y[173][186](y[172]y[171]1)):[142]
- 3848 [139]c$(j,w)[178]"acs"[175](y[172]y[171]1)[177]0[167] z[178][193](y[173][186](y[172]y[171]1))[170]([180](y)[171]1[172]pi[173]2):[142]
- 3850 [139]c$(j,w)[178]"act"[167] z[178][193](y)[170]pi[173]2:[142]
- 3852 [139]c$(j,w)[178]"inv"[175]y[179][177]0[167] z[178]1[173]y:[142]
- 3854 [143]----conversions
- 3856 [139]c$(j,w)[178]"rad"[167] z[178]y[172]pi[173]180:[142]
- 3858 [139]c$(j,w)[178]"deg"[167] z[178]y[172]180[173]pi:[142]
- 3860 [139]c$(j,w)[178]"ins"[167] z[178]y[173]25.4:[142]
- 3862 [139]c$(j,w)[178]"mms"[167] z[178]y[172]25.4:[142]
- 3864 [139]c$(j,w)[178]"dfr"[167] z[178]y[172]9[173]5[170]32:[142]
- 3866 [139]c$(j,w)[178]"dcg"[167] z[178](y[171]32)[172]5[173]9:[142]
- 3868 [139]c$(j,w)[178]"gms"[167] z[178]y[173].03536:[142]
- 3870 [139]c$(j,w)[178]"ozs"[167] z[178]y[172].03536:[142]
- 3872 [139]c$(j,w)[178]"lbm"[167] z[178]y[172]2.21:[142]
- 3874 [139]c$(j,w)[178]"kgm"[167] z[178]y[173]2.21:[142]
- 3876 [139]c$(j,w)[178]"lbf"[167] z[178]y[172]4.448:[142]
- 3878 [139]c$(j,w)[178]"nwf"[167] z[178]y[172].2248:[142]
- 3880 [139]c$(j,w)[178]"mls"[167] z[178]y[173]1.609344:[142]
- 3882 [139]c$(j,w)[178]"kms"[167] z[178]y[172]1.609344:[142]
- 3884 [139]c$(j,w)[178]"fps"[167] z[178]y[172].3048:[142]
- 3886 [139]c$(j,w)[178]"mps"[167] z[178]y[173].3048:[142]
- 3888 [139]c$(j,w)[178]"psi"[167] z[178]y[172]6.895[174]3:[142]
- 3890 [139]c$(j,w)[178]"nsm"[167] z[178]y[173]6.895[174]3:[142]
- 3892 [143] ifc$(j,w)="fn1"then z=y :return:rem user defined function 1
- 3894 [143] ifc$(j,w)="fn2"then z=y :return:rem user defined function 2
- 3896 [143] ifc$(j,w)="fn3"then z=y :return:rem user defined function 3
- 3898 [153]" definvalid parametersyson":z[178]0:e[178]1
- 3900 [142]
- 3902 [143]----currency/decimal/right justification
- 3904 r[178]2:[137]3908
- 3906 r[178][197]([202](c$(j,0),2))
- 3908 clm$[178][196]([181]([197](clm$)[172]10[174]r[170].5))
- 3910 [139][200](clm$,1)[178]" "[167]clm$[178][202](clm$,2)
- 3912 [139]r[177][195](clm$)[167]clm$[178][201]("00000000"[170]clm$,r)
- 3914 [139]r[167]clm$[178][200](clm$,[195](clm$)[171]r)[170]"."[170][201](clm$,r)
- 3916 [143]----right justify
- 3918 [139][195](clm$)[179]cw[167]clm$[178][201](s$[170]clm$,cw)
- 3920 [139][195](clm$)[177]cw[167]clm$[178][200](clm$,cw)
- 3922 [142]
- 3924 [143]----left justification
- 3926 [139][195](clm$)[179]cw[167]clm$[178]clm$[170][200](s$,cw[171][195](clm$))
- 3928 [139][195](clm$)[177]cw[167]clm$[178][200](clm$,cw)
- 3930 [142]
- 3932 [143]----percent/right justification
- 3934 clm$[178][196]([197](clm$)[172]100)
- 3936 [137]3906
- 3938 [143]----directory
- 3940 [153]"loadsys";:@"$":[153][163]25)"printpress any keywaitsys":[141]3018:[142]
- 3998 [143]----setup for printer
- 4000 [153]"loadsys calculated reports program "
- 4002 [153]" printer or interface configuration "
- 4003 [153]"print current option is:sys"p
- 4004 [153]"print press 1printwait cardco a, 1525
- 4006 print" 2[153][146] printers w/graphic interfaces"
- 4008 print" 3[153][146] 1526, mps801/802/803"
- 4009 print" 4[153][146] print to screen"
- 4010 ifp<>0thenprint" or s[153][146]end printer commands"
- 4012 ifp<>othenprint" e[153][146]xit to continue"
- 4014 print"[158] press the appropriate key "
- 4016 geta$:ifa$=""then4016
- 4018 ifa$="e"thenprint"[147]clearing...":return
- 4020 ifa$="s"then4044
- 4022 p=val(a$):pf=4
- 4024 ifp=1thenb1$=chr$(10):goto4000
- 4026 ifp=2thenb1$=chr$(0):goto4000
- 4028 ifp=3thenb1$=chr$(0):goto4000
- 4029 ifp=4thenb1$=chr$(0):pf=3:goto4000
- 4030 gosub602:goto4016
- 4032 rem----print terminator
- 4034 onpgoto4036,4038,4040,4038
- 4036 print#pf,b1$;:return
- 4038 print#pf,b1$:return
- 4040 print#pf:return
- 4042 rem----printer commands
- 4044 print"[147] [158] printer command [146]"
- 4046 print"[153] this routine will send character"
- 4048 print" string [chr$()] commands to an ascii"
- 4050 print" printer. commands must be entered in"
- 4052 print" the form of integers such as:"
- 4054 print"[158] ? 27[153] (escape code)"
- 4056 print" [158]? 66[153] (pitch code)"
- 4058 print" [158]? 2[153] (compressed mode)"
- 4060 print" [158]? *[153] (end the sequence)"
- 4062 print" this will be sent to the printer as:"
- 4064 print" [158]print#4,chr$(27)chr$(66)chr$(2)[153]"
- 4066 print" up to four(4) numbers may be sent,"
- 4068 print" the first normally being [158]27[153][146], the"
- 4070 print" escape character. end the sequence"
- 4072 print" by pressing return[153][146] when the asterisk"
- 4074 print" is showing. printers will vary, so"
- 4076 print" check your manual for the codes."
- 4078 print" any key[153][146] to continue or e[153][146]xit?[158]"
- 4079 geta$:ifa$=""then4079
- 4080 ifa$="e"thenreturn
- 4082 print"[147] [158] send printer command [146]"
- 4084 print" [153]enter code, then press return[146]"
- 4086 print" return[146] [153]only to quit"
- 4088 fori=1to4:print"[153]code[158]";i;" ? * [157][157][157][157]";:inputi$(i)
- 4090 ifi$(i)="*"then4094
- 4092 nexti
- 4094 on(i-1)goto4096,4098,4100,4102:goto4104
- 4096 print#4,chr$(val(i$(1))):goto4104
- 4098 print#4,chr$(val(i$(1)))chr$(val(i$(2))):goto4104
- 4100 print#4,chr$(val(i$(1)))chr$(val(i$(2)))chr$(val(i$(3))):goto4104
- 4102 print#4,chr$(val(i$(1)))chr$(val(i$(2)))chr$(val(i$(3)))chr$(val(i$(4)))
- 4104 print" a[153][146]nother code"
- 4106 print" t[153][146]est printer"
- 4108 print" e[153][146]xit to print"
- 4110 print" [158] press the appropriate key "
- 4112 geta$:ifa$=""then4112
- 4113 ifa$="a"then4082
- 4114 ifa$="t"thenprint#4,"abcdefghijklmnopqrstuvwxyz":goto4112
- 4116 ifa$="e"thenreturn
- 4118 gosub602:goto4112
-