-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfuncs.script
1517 lines (1229 loc) · 56.8 KB
/
funcs.script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
##
ºµre5»
º·:macro è=µ[·m0··:note #µn··0·FwLLLµn·l·Fmlµn·l·FWllµn·l·fm·0·'0·µ]¦·»
{
º:0p29¦··+15¦··l+27¦··l+32¦··l+128¦··l-4¦··»
º·:j1¦··Fmhh¦·l··Fwll¦··»
}
º:0a1¦»
##:skip¦
##===[[ OVERVIEW ]]============================================================#
º·:a10¦··»
º·····squick tour of functions available in gyges¦···f|·ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h·»
º··j··sas well as some of the related concepts¦······f|·ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h·»
º··j··srequired to demonstrate them¦·················f|·ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h·»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·3j··sapproximately 7 min duration¦·················f|·ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h·»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·3j··sthese functions supplement the build-in¦······f|·ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h·»
º··j··soperator set for more-complicated or¦·········f|·ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h·»
º··j··slesser-used actions¦··························f|·ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h·»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·3j··ssince i use gyges like others use python¦·····f|·ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h·»
º··j··sor perl, i have included extra abilities¦·····f|·ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h·»
º··j··sfor manipulating data and text¦···············f|·ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h·»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ
##:unskip¦
º·:k1¦···»
º·3h····sconditional¦······f<··ls<¦···2l······»
º··h····sƒ¦··l··srelational¦········f<········»
º··h·j··s¦··l··#" if,ifs,˜,ßµsµsµs"¦·······»
º··h·j··s¦··l··slogical¦···········f<········»
º··h·j··s„¦··l··#" and,or,xorµsµsµs"¦·······»
º·3h·j··strigonometry¦·····f<··ls<¦···2l······»
º··h····sƒ¦··l··splanar trig¦·······f<········»
º··h·j··s¦··l··#" sin,cos,tanµsµsµs"¦······»
º··h·j··s¦··l··skinematics¦········f<········»
º··h·j··s¦··l··#" source from yKINE"¦······»
º··h·j··s¦··l··sspherical trig¦····f<········»
º··h·j··s„¦··l··#" under development"¦······»
º·3h·j··sstring handling¦··f<··ls<¦···2l······»
º··h····sƒ¦··l··sparsing¦···········f<········»
º··h·j··s¦··l··#" len,left,midµsµsµs"¦·····»
º··h·j··s¦··l··strimming¦··········f<········»
º··h·j··s¦··l··#" trim,strimµsµsµs"¦·······»
º··h·j··s¦··l··spadding¦···········f<········»
º··h·j··s¦··l··#" lpad,lppadµsµsµs"¦·······»
º··h·j··s¦··l··sconverting¦········f<········»
º··h·j··s¦··l··#" lower,upperµsµsµs"¦······»
º··h·j··s¦··l··scleaning¦··········f<········»
º··h·j··s„¦··l··#" alpha,sevenµsµsµs"¦······»
º·3h·j··scell metadata¦····f<··ls<¦···2l······»
º··h····sƒ¦··l··scell types¦········f<········»
º··h·j··s¦··l··#" blank,calcµsµsµs"¦·······»
º··h·j··s¦··l··scell info¦·········f<········»
º··h·j··s¦··l··#" u,x,y,labelµsµsµs"¦······»
º··h·j··s¦··l··scell address¦······f<········»
º··h·j··s„¦··l··#" ru,ax,absaµsµsµs"¦·······»
º·3h·j··sdata ranges¦······f<··ls<¦···2l······»
º··h····sƒ¦··l···srange info¦········f<·······»
º··h·j··s¦··l···#" us,xs,ysµsµsµs"¦········»
º··h·j··s¦··l···srange types¦·······f<·······»
º··h·j··s¦··l···#" blanks,calcsµsµsµs"¦····»
º··h·j··s¦··l···sstatistics¦········f<·······»
º··h·j··s¦··l···#" sum,mean,sdevµsµsµs"¦···»
º··h·j··s¦··l···sdata lookup¦·······f<·······»
º··h·j··s„¦··l···#" hl,vl,rl,clµsµsµs"¦·····»
º·3h·j··ssupporting¦·······f<··ls<¦···2l······»
º··h····sƒ¦··l···sformula auditing¦··f<·······»
º··h·j··s¦··l···#" f,r,nproµsµsµs"¦········»
º··h·j··s¦··l···sdate and time¦·····f<·······»
º··h·j··s„¦··l···#" now,days,dvµsµsµs"¦·····»
##:skip¦
ÏÏ·ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ·ÏÏ
##===[[ COLORATION ]]==========================================================#
º·®a1..i38±·x·»
º·:b2¦···sspreadsheets are versitle, powerful, and forgiving¦····f<··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h»
º···j····sBUT, as a result, wickedly deceptive and dangerous¦····f<··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ
º···j····sgyges uses automatic cell coloration to be more¦·······f<··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h»
º···j····sinformative, traceable, and debuggable¦················f<··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:a23¦·stxt¦········f>··l·sstring literal¦············ls<¦··ls<¦··»
º·0··j··#a23©"+"¦····f>··l·sstring formula¦············ls<¦··ls<¦··»
º·0··j··s~`k¦¦·······f>··l·sformula reused/like¦·······ls<¦··ls<¦··»
º·0·2j··+42¦·········f>··l·snumeric literal¦···········ls<¦··ls<¦··»
º·0··j··=`k¦+15¦·····f>··l·snumeric formula¦···········ls<¦··ls<¦··»
º·0··j··s~`k¦¦·······f>··l·sformula reused/like¦·······ls<¦··ls<¦··»
º·0·2j··s&a37¦·······f>··l·saddress pointer¦···········ls<¦··ls<¦··»
º·0··j··s&a37..a37¦··f>··l·srange pointer¦·············ls<¦··ls<¦··»
º·0··j··s!a37¦·······f>··l·scalculated pointer¦········ls<¦··ls<¦··»
º·0··j··sÖname¦······f>··l·svariable assignment¦·······ls<¦··ls<¦··»
º·0·2j··=p29+q29+r29+s29+t29+15+10¦·f>·l·swarning, complex¦·ls<¦··ls<¦··»
º·0··j···············f>··l·sblank or empty¦············ls<¦··ls<¦··»
ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:e24¦·s (cur)¦····l·s current location¦·········ls<¦··ls<¦··3h»
º···2j··s (req)¦····l·s requires value from¦······ls<¦··ls<¦··3h»
º· ··j··s (pro)¦····l·s provides value to¦········ls<¦··ls<¦··3h»
º···2j··s (lik)¦····l·s imitates formula from¦····ls<¦··ls<¦··3h»
º····j··s (cop)¦····l·s reuses/like current¦······ls<¦··ls<¦··3h»
º···2j··s (roo)¦····l·s root of selection¦········ls<¦··ls<¦··3h»
º····j··s (fil)¦····l·s all other selected¦·······ls<¦··ls<¦··3h»
º···2j··s (err)¦····l·s contains an error¦········ls<¦··ls<¦··3h»
º:e24¦»
##---(line titles)-----------#
º:a10¦»
º··2j····snumber¦ ····f>·»
º··2j····sstring¦ ····f>·»
##---(literals)--------------#
º:b10¦»
º·····slit¦········f>·»
º·2j··sÕ¦··f|·»
º·l···stype "+125µn" to¦······f|··ls<¦··ls<¦··ls<¦··3h»
º·j···senter number here¦·····f|··ls<¦··ls<¦··ls<¦··3h»
º·hk·» Ï
+125¦······f>··Ï
º·l··v··j·3l··x··h»
º·2j··sÕ¦··f|·»
º·l···stype "sabcµn" to¦······f|··ls<¦··ls<¦··ls<¦··3h»
º·j···senter text here¦·······f|··ls<¦··ls<¦··ls<¦··3h»
º·hk·» Ï
sabc¦······f>··Ï
º·l··v··j·3l··x··h»
##---(formulas)--------------#
º:c10¦»
º·····sform¦·······f>·»
º·2j··sÕ¦··f|·»
º·l···stype "=c12+10µn" to¦···f|··ls<¦··ls<¦··ls<¦··3h»
º·j···senter numeric formula¦·f|··ls<¦··ls<¦··ls<¦··3h»
º·hk·» Ï
=b12+10¦···f>··Ï
º·l··v··j·3l··x··h»
º·2j··sÕ¦··f|·»
º·l···stype "#c14©"+"µn" to¦··f|··ls<¦··ls<¦··ls<¦··3h»
º·j···senter string formula¦··f|··ls<¦··ls<¦··ls<¦··3h»
º·hk·» Ï
#b14©"+"¦··f>··Ï
º·l··v··j·3l··x··h»
##---(like formula)----------#
º:d10¦»
º·····slike¦·······f>·»
º·2j··sÕ¦··f|·»
º·l···stype "~$c12µn" to¦·····f|··ls<¦··ls<¦··ls<¦··3h»
º·j···senter like formula¦····f|··ls<¦··ls<¦··ls<¦··3h»
º·hk·» Ï
s~$c12¦····f>··Ï
º·l··v··j·3l··x··h»
##---(copied likes)----------#
º·2j·····sÕ¦·····f|·»
º·4k·l···s--->¦··f|·»
º·2j·····sÕ¦·····f|·»
º·2j·····sÕ¦·····f|·»
º·l···j··scopy like formula¦·····f|··ls<¦··ls<¦··ls<¦··3h»
º·····j··sdown to replicate¦·····f|··ls<¦··ls<¦··ls<¦··3h»
º·4k·2h·»·y·Ï
··2j···p··Ï
··2k·l·p··Ï
··2j···p··Ï
º·j·l··v··j·3l··x··h·k·»
##---(complex formula)-------#
º·:f10¦·»
º·····stotal¦··········f>·»
º·2j··=®(b12..e12)¦······l·s sum numbers¦····ls<¦··2h·»
º·2j··=count(b14..e14)¦··l·s count strings¦··ls<¦··2h·»
º·:c17¦··syou can see most of¦·······f|··ls<¦··ls<¦··ls<¦··3h»
º·····j··sof the content color¦······f|··ls<¦··ls<¦··ls<¦··3h»
º·····j··svariants above¦············f|··ls<¦··ls<¦··ls<¦··3h»
j·ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
##---(requires)--------------#
º·®a15..i22±·x·»
º·:e17¦··sthe purple background means¦············f|··ls<¦··ls<¦··ls<¦··ls<¦··4h»
º···j····sthe yellow formula needs those four¦····f|··ls<¦··ls<¦··ls<¦··ls<¦··4h»
º···j····scells to generate its answer¦···········f|··ls<¦··ls<¦··ls<¦··ls<¦··4h»
º·:f12¦··k·sƒ€€€€€€€‚¦·ls<¦·h·2j·s„€€€€€€€…¦·ls<¦·h···k·»
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
##---(like and provides)-----#
º·k·X·2j·X·»
º·®a11..i11±·x··®a13..i13±·x·»
º·®a15..i22±·x·»
º·:d17¦··scyan means it uses c14's for its¦·······f|··ls<¦··ls<¦··ls<¦··ls<¦··4h»
º···j····sformula, and green means it is used¦····f|··ls<¦··ls<¦··ls<¦··ls<¦··4h»
º···j····sby e14 and f14 for its content¦·········f|··ls<¦··ls<¦··ls<¦··ls<¦··4h»
º·:d14¦··k·sƒ€€€€€€€‚¦·ls<¦·h·2j·s„€€€€€€€…¦·ls<¦·h···k·»
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
##---(sources likes)---------#
º·k·X·2j·X·»
º·®a13..i13±·x··®a15..i15±·x·»
º·®a15..i22±·x·»
º·:b17¦··sfinally, crimson means both¦············f|··ls<¦··ls<¦··ls<¦··ls<¦··4h»
º···j····sd12 and e12 take its formula¦···········f|··ls<¦··ls<¦··ls<¦··ls<¦··4h»
º···j····sand adapt it for their onw values¦······f|··ls<¦··ls<¦··ls<¦··ls<¦··4h»
º·:c12¦··k·sƒ€€€€€€€‚¦·ls<¦·h·2j·s„€€€€€€€…¦·ls<¦·h···k·»
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
##---(bottom line)-----------#
º·k·X·2j·X·»
º·®a11..i11±·x··®a13..i13±·x·»
º·®a15..i22±·x·»
º·:c17¦··sfor gyges, coloration is not for¦·······f|··ls<¦··ls<¦··ls<¦··ls<¦··4h»
º···j····scute and pretty, its for rapid¦·········f|··ls<¦··ls<¦··ls<¦··ls<¦··4h»
º···j····sdebugging and transparency¦·············f|··ls<¦··ls<¦··ls<¦··ls<¦··4h»
j·ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
##===[[ LOGIC ]]===============================================================#
##:unskip¦
º·®a1..i38±·x·»
º·:a2¦····sone of gyges' critical protections from subtle¦············f|··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h»
º····j····smistakes is the strict interpretation of formulas¦·········f|··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:b5¦····snever assume a string's value is zero or atoi(),¦··········f|··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h»
º····j····sor assume a number in string is just a printf() result¦····f|··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:c8¦····syou can mix strings, references and numbers at will,¦······f|··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h»
º····j····sonly explicitly, never by forgiving interpretation¦········f|··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:b11¦···shence, gyges provides several different IF's¦··············f|··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:b13¦··sÕa¦·f|·j··+10¦··f|·»
º·:c13¦··sÕb¦·f|·j··+21¦··f|·»
º·:d13¦··sÕc¦·f|·j··+99¦··f|·»
º·:e13¦··sÕd¦·f|·j··+386¦·f|·»
º·:f13¦··sÕs¦·f|·j··shey¦·f|·»
º·:g13¦··sÕt¦·f|·j··sbye¦·f|·»
º·:a16¦···= if (a < b, c, d)¦····l·s#" = if (a < b, c, d)"¦······ls<¦··ls<¦··l·scorrect¦··································f<·ls<¦··ls<¦··ls<¦··ls<¦··0·»
··ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:note ME.a ÔMc¦···:note LE,numerics ÔKc¦··» ÏÏ·ÏÏ·ÏÏ
º·:note MG,matches ×Sc¦··» ÏÏ·ÏÏ·ÏÏ
º·:note OH,matches ×Uc¦··» ÏÏ·ÏÏ·ÏÏ
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:note #¦·»
º·:a18¦···# if (a < b, c, d)¦····l·s#" # if (a < b, c, d)"¦······ls<¦··ls<¦··l·sattempt to put numeric in string result¦··f<·ls<¦··ls<¦··ls<¦··ls<¦··0·»
··ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:note MG.a ÔM5¦···:note LG,numerics ÔK5¦··» ÏÏ·ÏÏ·ÏÏ
º·:note MH,matches ×S5¦··» ÏÏ·ÏÏ·ÏÏ
º·:note OJ,BOOM ×U5¦··» ÏÏ·ÏÏ·ÏÏ
º·m0··:a35¦···# if (a < b, c, d)¦····l·smeans execution found VALUE when it needed something else¦···f<··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··'0·»
··ÏÏ·ÏÏ·ÏÏ·ÏÏ ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:note #¦·»
º·:a20¦···= if (a < b, s, t)¦····l·s#" = if (a < b, s, t)"¦······ls<¦··ls<¦··l·stried to use value IF on string values¦···f<·ls<¦··ls<¦··ls<¦··ls<¦··0·»
º·:note MH.a ÔMC¦···:note LH,strings ÔKC¦··» ÏÏ·ÏÏ·ÏÏ
º·:note MJ,BOOM ×SC¦··» ÏÏ·ÏÏ·ÏÏ
º·m0··:a37¦···= if (a < b, s, t)¦····l·smeans execution found STRING when it needed something else¦··f<··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··'0·»
··ÏÏ·ÏÏ·ÏÏ·ÏÏ ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:note #¦·»
º·:a22¦···# ifs (a < b, s, t)¦·f>·l·s#" # ifs (a < b, s, t)"¦······ls<¦··ls<¦··l·scorrect¦··································f<·ls<¦··ls<¦··ls<¦··ls<¦··0·»
··ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:note MJ.a ÔME¦···:note LJ,strings ÔKE¦··» ÏÏ·ÏÏ·ÏÏ
º·:note MK,matches ×SE¦··» ÏÏ·ÏÏ·ÏÏ
º·:note OL,matches ×UE¦··» ÏÏ·ÏÏ·ÏÏ
··ÏÏ·ÏÏ·ÏÏ·ÏÏ ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:note #¦·»
º·:b26¦···sthere are other combos, but you get the idea¦················f<··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:b28¦···#"if for returning values"¦······························f<··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:b29¦···#"ifs for returning strings"¦·····························f<··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:b30¦···#"ifr for references and variables"¦······················f<··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:b31¦···#"ifm for conditional macro/agrios execution ;)"¦·········f<··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ ÏÏ·ÏÏ·ÏÏ·ÏÏ
##:unskip¦
##---(logical)------------------#
º·®a17..i38±·x·»
º·®a11..i11±·x·»
º:b19¦··scovered in operators demo¦··f|·f.··ls<¦··ls<¦··ls<¦··ls<¦··h··»
º:b20¦··snumerics¦··ls<¦··h··»
º·2j··#" à =="¦··»
º··j··#" Þ !="¦··»
º·2j··#" <"¦······»
º··j··#" Ü <="¦··»
º··j··#" >"¦······»
º··j··#" Ý >="¦··»
ÏÏ·ÏÏ·ÏÏ·ÏÏ
º:d20¦··sstring¦····ls<¦··h··»
º·2j··#" ©="¦·····»
º··j··#" ©!"¦·····»
º·2j··#" â"¦······»
º··j··#" ã"¦······»
º·2j··#" ©<"¦·····»
º··j··#" ©>"¦·····»
º·2j··#" ©Ü"¦·····»
º··j··#" ©Ý"¦·····»
ÏÏ·ÏÏ·ÏÏ·ÏÏ
º:f20¦··slogical¦··ls<¦··h··»
º·2j··#" !"¦······»
º·2j··#" Ð &&"¦··»
º··j··#" Ñ ||"¦··»
º·2j··#" Ô !&"¦··»
º··j··#" Õ !|"¦··»
º·2j··#" Ò &|"¦··»
º··j··#" Ó |&"¦··»
ÏÏ·ÏÏ·ÏÏ·ÏÏ
º:h20¦··shelpful¦··ls<¦··h··»
º·2j··#" ˜"¦······»
º··j··#" range"¦··»
º·2j··#" ß"¦······»
º··j··#" about"¦··»
ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:a34¦···= range (b, a, c)¦········l·#f(`h)¥¦······················ls<¦··ls<¦··l·sis b between a and c (inclusive)¦·········f<·ls<¦··ls<¦··ls<¦··ls<¦··0·»
ÏÏ·ÏÏ·ÏÏ·ÏÏ ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:a36¦···= about (c, b, a)¦········l·#f(`h)¥¦······················ls<¦··ls<¦··l·sis c equal to b plus/minus a¦·············f<·ls<¦··ls<¦··ls<¦··ls<¦··0·»
ÏÏ·ÏÏ·ÏÏ·ÏÏ ÏÏ·ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ·ÏÏ ÏÏ·ÏÏ·ÏÏ·ÏÏ
##===[[ BASIC TRIG ]]==========================================================#
## :unskip¦
º·®a1..i38±·x·»
º·:d3¦····sas a spider roboticist, kinematics¦·······f<··ls<¦··ls<¦··ls<¦··ls<¦··4h»
º····j····sand trigonometry are vital. not just¦····f<··ls<¦··ls<¦··ls<¦··ls<¦··4h»
º····j····sthe basics, but nearly every variation¦···f<··ls<¦··ls<¦··ls<¦··ls<¦··4h»
{
##---(4th quarter)---------------#
º·:a6¦··s y µ@¦···ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
##---(3rd quarter)---------------#
º·0j····s µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_e µ_e¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V µ_e¦···ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_4µsµsµsµsµsµsµsµsµsµsµsµ_e¦···ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V µsµs¦····ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V ´ µs µ_e¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V µs µs¦···ls<¦··ls<¦··ls<¦··ls<¦··»
##---(2nd quarter)---------------#
º·0j····s µ_V ´ µs µ_e¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V µs µs¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V ´ µs µ_e¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s sin µS µ_V µs µs¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V ´ µs µ_e¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V µs µs¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V ´ µs µ_e¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_Vµsï µs¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s x µ@µ_Hµ_Hµ_Hµ_Hµ_5µ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_8µ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_eµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ@¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··»
##---(1st quarter)---------------#
º·0j····s µ_V cos µC¦···ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ@¦···ls<¦··ls<¦··ls<¦··ls<¦··»
}
º·m0·»
º·:e8¦····sat all starts with a fullsome set of¦·····f<··ls<¦··ls<¦··ls<¦··ls<¦··4h»
º····j····splanar trigonomety functions, including¦··f<··ls<¦··ls<¦··ls<¦··ls<¦··4h»
º····j····smany that most people have never seen¦····f<··ls<¦··ls<¦··ls<¦··ls<¦··4h»
º·'0·»
ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·m0·»
º·:f13¦···si am a degree guy ;) so¦·················f<··ls<¦··ls<¦··ls<¦··3h»
º····j····sradian versions end with 'r'¦·············f<··ls<¦··ls<¦··ls<¦··3h»
º····j····s(sinr vs sin)¦····························f<··ls<¦··ls<¦··ls<¦··3h»
º·'0·»
ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·m0·»
º·:f17¦···sdeg¦·····f>·f-··lX·lX·lX··3h»
º·j·······+0¦·······f>·····lX·lX·lX··3h»
º·j·······=`k+¥15¦··f>·y···lX·lX·lX··3h»
º·j·······p················lX·lX·lX··3h»
º·j·······p················lX·lX·lX··3h»
º·j·······p················lX·lX·lX··3h»
º·j·······p················lX·lX·lX··3h»
º·j·······p················lX·lX·lX··3h»
º·j·······p················lX·lX·lX··3h»
º·j·······p················lX·lX·lX··3h»
º·j·······p················lX·lX·lX··3h»
º·'0·»
º·:f31¦···syup, gonna build a table¦·················f<··ls<¦··ls<¦··ls<¦··3h»
º····j····sfor later use to test¦····················f<··ls<¦··ls<¦··ls<¦··3h»
º····j····sdata lookups and pointers¦················f<··ls<¦··ls<¦··ls<¦··3h»
º····j·»
ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·®f30..i38±·x·»
º·:g17¦··ssin¦··f>·f-···l··scos¦··f>·f-··h·»
j·=ù($f18)¦··f>·ff·f3
º·m0··:f31¦··sfor sin¦··l·#f(g18)¦··ls<¦··'0·»
ÏÏ·ÏÏ·ÏÏ·ÏÏ
l·=ý($f18)¦··f>·ff·f3
º·m0··:g32¦··sfor cos¦··l·#f(h18)¦··ls<¦··'0·»
ÏÏ·ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·m0·»
º·:f34¦···snow we use like formulas¦·················f<··ls<¦··ls<¦··ls<¦··3h»
º····j····sto build the table¦·······················f<··ls<¦··ls<¦··ls<¦··3h»
º····j·»
º·'0·»
ÏÏ·ÏÏ·ÏÏ·ÏÏ
·h·j···s~`k'¦¦··f>·ff·f3·
ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·m0·»
º·:f34¦···sand copy it through both¦·················f<··ls<¦··ls<¦··ls<¦··3h»
º····j····scolumns (it adapts)¦······················f<··ls<¦··ls<¦··ls<¦··3h»
º····j·»
ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·'0·»
·y·lp·h··8(jp·lp·h)
º·:g18¦·»
ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·m0·»
º·:f34¦···sù = sin, ý = cos, and ú = tan¦············f<··ls<¦··ls<¦··ls<¦··3h»
º····j····s ¦········································f<··ls<¦··ls<¦··ls<¦··3h»
º····j·»
ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·'0·»
º·h·k··v·el·ej·Y·»
##===[[ EXTENDED TRIG ]]=======================================================#
##:unskip¦
º·®a1..i38±·x·»
{
##---(4th quarter)----------#
º:a6¦···s y µ@¦·············ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦············ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦················ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s csc µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µq¦··ls<¦··ls<¦··ls<¦··ls<¦··»
##---(3rd quarter)----------#
º·0j····s xcsc µ_V µq cot¦···ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_e µ_e µq¦·ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s cvs µ_V µ_e¦···ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_4µsµsµsµsµsµsµsµsµsµsµsµ_e¦···ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V µ_d µsµs µq¦····ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s scrd µ_V µ_d ´ µsµ_d µ_e µq¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_d µ_V µs µs µ_d µq¦···ls<¦··ls<¦··ls<¦··ls<¦··»
##---(2nd quarter)----------#
º·0j····s µ_d µ_V ´ µs µ_d µ_e µq¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V µs µs µ_dsagµ_d µq¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V ´ µs µ_d µ_e µq tan ú¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s sin µS µ_V µs µs µ_d µ_d µq¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V ´ apo µ_dµs µ_d µ_e µq¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V µs µ_d µs crd µ_d µq¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V ´ µ_d µs µ_d µ_e arc µq¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_Vµsï µs µ_d µq¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s x µ@µ_Hµ_Hµ_Hµ_Hµ_5µ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_8µ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_eµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµ_Hµqµ_Hµ_Hµ_Hµ_Hµ@¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··»
##---(1st quarter)----------#
º·0j····s µ_V cos µC siv xsec sec¦···ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ_V¦··ls<¦··ls<¦··ls<¦··ls<¦··»
º·0j····s µ@¦···ls<¦··ls<¦··ls<¦··ls<¦··»
}
³
º·:c2¦··Pm·¥·»
º·m0·»
º·:c32¦···swhile only the basic six are required,¦···f<··ls<¦··ls<¦··ls<¦··ls<¦··4h»
º····j····susing other variants significantly¦·······f<··ls<¦··ls<¦··ls<¦··ls<¦··4h»
º····j····sreduces formula size and complexity¦······f<··ls<¦··ls<¦··ls<¦··ls<¦··4h»
º·'0·»
ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:e14¦··sbasic¦···f|··j·#"sin"¦··f|··j·#"cos"¦··f|··j·#"tan"¦··f|··j·#"cot"¦··f|··j·#"sec"¦··f|··j·#"csc"¦··f|····························»
º·:e2¦···v·10j·y·l·p·stan¦·j·¦lrµT¦··»
ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:f14¦··sancient¦·f|··j·#"crd"¦··f|··j·#"arc"¦··f|··j·#"sag"¦··f|··j·#"apo"¦··f|··j·#"los"¦··f|·········································»
º·:f2¦···v·10j·y·l·p·ssec¦·j·¦l·dl·isec¦··»
ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:g14¦··sversed¦··f|··j·#"siv"¦··f|··j·#"cov"¦··f|··j·#"sic"¦··f|··j·#"coc"¦··f|··j·#"hsiv"¦·f|··j·#"hcov"¦·f|··j·#"hsic"¦·f|··j·#"hcoc"¦·f|··»
º·:g2¦···v·10j·y·l·p·scrd¦·j·¦l·Rcrd¦··»
ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:h14¦··sother¦···f|··j·#"xsec"¦·f|··j·#"xcsc"¦·f|··j·#"scrd"¦·f|··j·#"xcrd"¦·f|··j·#"hcrd"¦·f|··j·#"csag"¦·f|··j·#"xsag"¦·f|··j·#"fsag"¦·f|··»
º·:h2¦···v·10j·y·l·p·srad¦·j·¦l·Rrad¦··»
ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:i14¦··sreverse¦·f|··j·#"asin"¦·f|··j·#"acos"¦·f|··j·#"atan"¦·f|··j·#"acrd"¦·f|······················································»
ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:i22¦··sconvert¦·f|··j·#"rad"¦··f|··j·#"deg"¦··f|················································································»
ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·m0·»
º·:c36¦···#"CHEAT>"¦·»
º·:d36¦···sto keep trig functions calculatable,¦·····f<··ls<¦··ls<¦··ls<¦··ls<¦··4h»
º····j····sinfinity ß 10M (9,999,999)¦···············f<··ls<¦··ls<¦··ls<¦··ls<¦··4h»
º·'0·»
º·:f9¦·fN·»
ÏÏ·ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:f9¦·fn·»
ÏÏ·ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ·ÏÏ
##===[[ STRING ]]==============================================================#
##:unskip¦
º·®a1..i38±·x·»
º·:a1¦···sÖs¦··f|·»
º···l····sstring manipulation is critical, but common and boring;¦··f<··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h»
º···j····sso, we'll just do a general sampling of functions¦········f<··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ
##---(length)-----------------#
º·m0·:d7¦····scount of characters in string¦············f<··ls<¦··ls<¦··ls<¦··ls<¦··'0·»
º········= len (s)¦·········f<··ls<¦··l#f(`hh)¥¦··ls<¦··ls<¦··4h·»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ
··ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·m0·®d7..i7±··x·'0·»
##---(sub-string)-------------#
º·m0·:d11¦···sextracting specific sub-strings¦··········f<··ls<¦··ls<¦··ls<¦··ls<¦··'0·»
º········# left (s, 3)¦······f<··ls<¦··l#f(`hh)¥¦··ls<¦··ls<¦··4h·»
º···j····# right (s, 7)¦······f<··ls<¦··l#f(`hh)¥¦··ls<¦··ls<¦··4h·»
º···j····# mid (s, 10, 6)¦··f<··ls<¦··l#f(`hh)¥¦··ls<¦··ls<¦··4h·»
º···j····# beg (s, 40)¦·····f<··ls<¦··l#f(`hh)¥¦··ls<¦··ls<¦··4h·»
º···j····= l (b7)¦············f<··ls<¦··l#f(`hh)¥¦··ls<¦··ls<¦··4h·»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ
··ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·m0·®d11..i11±··x·'0·»
##---(other extract)----------#
º·m0·:d13¦···sfunkier data extraction¦··················f<··ls<¦··ls<¦··ls<¦··ls<¦··'0·»
º········# at (s, 5)¦······f<··ls<¦··l#f(`hh)¥¦··ls<¦··ls<¦··4h·»
º···j····# word (s, 4)¦······f<··ls<¦··l#f(`hh)¥¦··ls<¦··lssame as ©* operator¦··ls<¦··ls<¦··6h·»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ
··ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·m0·®d13..i13±··x·'0·»
##---(getting cell data)------#
º·m0·:d15¦···saccessing cell data¦······················f<··ls<¦··ls<¦··ls<¦··ls<¦··'0·»
º········# b7¦················f<··ls<¦··l#f(`hh)¥¦··ls<¦··l·scell's full result¦··ls<¦··ls<¦··ls<¦··7h·»
º···j····# p (b7)¦············f<··ls<¦··l#f(`hh)¥¦··ls<¦··l·scell's exact printable¦····ls<¦··ls<¦··ls<¦··7h·»
º···j····# p (c7)¦············f<··ls<¦··l#f(`hh)¥¦··ls<¦··l·smerge's exact printable¦···ls<¦··ls<¦··ls<¦··7h·»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ
··ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·m0·®d15..i15±··x·'0·»
##---(parsing fields)---------#
º·m0·:d18¦···sextracting a field from a string (©/)¦····f<··ls<¦··ls<¦··ls<¦··ls<¦··'0·»
º···j·h··sÖf¦··f|··l·stesting µf one µfµf 6 µf endpoint µf¦······f<··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h»
º···j····# parse (f, 2)¦······f<··ls<¦··l#f(`hh)¥¦··ls<¦··lssame as ©/ operator¦··ls<¦··ls<¦··6h·»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ
··ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·m0·®d18..i18±··x·'0·»
##---(parsing list item)------#
º·m0·:d21¦···sextracting list item (©´)¦················f<··ls<¦··ls<¦··ls<¦··ls<¦··'0·»
º···j·h··sÖl¦··f|··l·s,a10,a22,c5,g16,h12,i3,¦························f<··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h»
º···j····# list (l, 5)¦······f<··ls<¦··l#f(`hh)¥¦··ls<¦··lssame as ©´ operator¦··ls<¦··ls<¦··6h·»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ
··ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·m0·®d21..i21±··x·'0·»
##---(trimming spaces)--------#
º·m0·:d30¦···sremoving/trimming spaces¦·················f<··ls<¦··ls<¦··ls<¦··ls<¦··'0·»
º···j·h··sÖt¦··f|··l·s extra spaces ¦······f<··ls<¦··ls<¦··ls<¦··lsw wraps string in å...榷·ls<¦··ls<¦··ls<¦··7h»
º···j····# w (t)¦···········f<··ls<¦··ls<¦··ls<¦··l#f(`4h)¥¦··ls<¦··ls<¦··6h·»
º···j····# w (ltrim (t))¦···f<··ls<¦··ls<¦··ls<¦··l#f(`4h)¥¦··ls<¦··ls<¦··6h·»
º···j····# w (rtrim (t))¦···f<··ls<¦··ls<¦··ls<¦··l#f(`4h)¥¦··ls<¦··ls<¦··6h·»
º···j····# w (trim (t))¦···f<··ls<¦··ls<¦··ls<¦··l#f(`4h)¥¦··ls<¦··ls<¦··6h·»
º···j····# w (strim (t))¦···f<··ls<¦··ls<¦··ls<¦··l#f(`4h)¥¦··ls<¦··ls<¦··6h·»
º···j····# w (etrim (t))¦···f<··ls<¦··ls<¦··ls<¦··l#f(`4h)¥¦··ls<¦··ls<¦··6h·»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ
··ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·m0·®d30..i30±··x·'0·»
##---(cleaning characters)----#
º·m0·:d35¦···sredacting/cleaning bad characters¦········f<··ls<¦··ls<¦··ls<¦··ls<¦··'0·»
º···j·h··sÖc¦··f|··l·stesting ^-the ~ ?#!. 5, ¸aƹ 1 a [n]¦······f<··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h»
º···j····# alpha (c)¦······f<··ls<¦··ls<¦··ls<¦··ls<¦··l#f(`5h)¥¦··ls<¦··6h·»
º···j····# alphac (c)¦······f<··ls<¦··ls<¦··ls<¦··ls<¦··l#f(`5h)¥¦··ls<¦··6h·»
º···j····# seven (c)¦······f<··ls<¦··ls<¦··ls<¦··ls<¦··l#f(`5h)¥¦··ls<¦··6h·»
º···j····# sevenc (c)¦······f<··ls<¦··ls<¦··ls<¦··ls<¦··l#f(`5h)¥¦··ls<¦··6h·»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ
··ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·m0·®d35..i35±··x·'0·»
##---(padding strings)--------#
º·m0·:d38¦···spadding strings to specific length¦·······f<··ls<¦··ls<¦··ls<¦··ls<¦··'0·»
º···j····# w (lpad (b4, 7))¦····f<··ls<¦··ls<¦··ls<¦··l#f(`4h)¥¦··ls<¦··ls<¦··6h·»
º···j····# w (rpad (b4, 15))¦···f<··ls<¦··ls<¦··ls<¦··l#f(`4h)¥¦··ls<¦··ls<¦··6h·»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ
··ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·m0·®d38..i38±··x·'0·»
##---(redaction)--------------#
## º·h·j····sÖj¦··f|··l·swelcome to the jeopardy game¦····f<··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h»
## º···j····# mask (j, "etraonisld")¦··f<··ls<¦··ls<¦··ls<¦··l#f(`4h)¥¦··ls<¦··ls<¦··ls<¦··7h·»
## º···j····# redact (j, "etraonisld")¦··f<··ls<¦··ls<¦··ls<¦··l#f(`4h)¥¦··ls<¦··ls<¦··ls<¦··7h·»
##---(summary)----------------#
º·:b38¦··sWHEW, just a sampling of more frequently used¦·····f|···ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h»
º·v·el·»
··ÏÏ·ÏÏ·ÏÏ·ÏÏ
··ÏÏ·ÏÏ·ÏÏ·ÏÏ
··ÏÏ·ÏÏ·ÏÏ·ÏÏ
¥·0
##===[[ CELL TYPES ]]==========================================================#
º·®a1..i38±·x·»
º·:a2¦···»
º·····swhile cell informating, addressing, and typing¦·····f|·ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h·»
º··j··sare relatively straight forward; they are vital¦····f|·ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h·»
º··j··sto advanced macros and pointers¦····················f|·ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h·»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ
##---(number line)-----------#
º·:a10¦·····················l·slit¦·····f>··l·sform¦·····f>··l·slike¦····f>··l·s--->¦····f>··l·stotal¦············f>·»
º·:a12¦··snumber¦···f>······l·+125¦·····f>··l·=b12+10¦···f>··l·s~$c12¦···f>··l·s~$c12¦···f>··l·=®(b12..e12)¦······f>·»
##---(variables)-------------#
º·:h2¦···sÖT¦·········f>··l·sµ@¦·»
º·:h3¦···sÖF¦·········f>··l·sµs¦·»
º·:h4¦···sÖs¦·········f>··l·s&h2¦··»
º·:a7¦···sÖr¦·········f>··l·s&b12¦··»
##---(get info)--------------#
º·:a14¦··= t (a12)¦···f>···ll·#f(`2h)¥¦··ls<¦···l·stype as a number¦·····ls<¦··ls<¦··»
º·:a15¦··# ta (a12)¦···f>···ll·#f(`2h)¥¦··ls<¦···l·stype as a character¦··ls<¦··ls<¦··»
º·:a16¦··# ts (a12)¦···f>···ll·#f(`2h)¥¦··ls<¦···l·stype as a label¦······ls<¦··ls<¦··»
·ÏÏ·ÏÏ·ÏÏ·ÏÏ
·ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:e14¦··v·2j·2l·y··2l·p·»
º·:a14¦··v·3j·y··5(lp)·»
##---(cell types)------------#
º·:a27¦··smajor cell types¦··f|·f.··8(ls<¦)·0·»
º·2j·l·m0···sµsµstextµsµsµsµsµs¦·······ls<¦··h··»
º·····2j····#"slit s"©+ifs (slit (ár),T,F)¦···········ls<¦··h··»
º······j····#"scalc #"©+ifs (scalc (ár),T,F)¦···········ls<¦··h··»
º······j····#"slike 5"©+ifs (slike (ár),T,F)¦···········ls<¦··h··»
º·····2j····sµsµsµsµsµsµsµsµsµsµsµs¦···ls<¦··h··»
º······j····#"str "©+ifs (str (ár),T,F)¦···········ls<¦··h··»
º·'0·2l·m0··sµsµsvalueµsµsµsµs¦········ls<¦··h··»
º·····2j····#"nlit n"©+ifs (nlit (ár),T,F)¦···········ls<¦··h··»
º······j····#"ncalc ="©+ifs (ncalc (ár),T,F)¦···········ls<¦··h··»
º······j····#"nlike 9"©+ifs (nlike (ár),T,F)¦···········ls<¦··h··»
º······j····#"nmath ¼"©+ifs (nmath (ár),T,F)¦···········ls<¦··h··»
º······j····sµsµsµsµsµsµsµsµsµsµsµs¦···ls<¦··h··»
º······j····#"num "©+ifs (num (ár),T,F)¦···········ls<¦··h··»
º·'0·2l·m0··sµsµspointµsµsµsµs¦········ls<¦··h··»
º·····2j····#"ref &"©+ifs (ref (ár),T,F)¦···········ls<¦··h··»
º······j····#"cref !"©+ifs (cref (ár),T,F)¦···········ls<¦··h··»
º······j····#"rlike 1"©+ifs (rlike (ár),T,F)¦···········ls<¦··h··»
º······j····#"rref :"©+ifs (rref (ár),T,F)¦···········ls<¦··h··»
º······j····sµsµsµsµsµsµsµsµsµsµsµs¦···ls<¦··h··»
º······j····#"point "©+ifs (point (ár),T,F)¦···········ls<¦··h··»
º·'0·2l·m0··sµsµsbroadµsµsµsµs¦········ls<¦··h··»
º·····2j····#"lit "©+ifs (lit (ár),T,F)¦···ls<¦··h··»
º······j····#"calc "©+ifs (calc (ár),T,F)¦···ls<¦··h··»
º······j····#"like "©+ifs (like (ár),T,F)¦···ls<¦··h··»
º······j····#"form "©+ifs (form (ár),T,F)¦···ls<¦··h··»
º······j····#"var "©+ifs (var (ár),T,F)¦···ls<¦··h··»
º······j····#"merge "©+ifs (merge (ár),T,F)¦···ls<¦··h··»
º······j····#"blank -"©+ifs (blank (ár),T,F)¦···ls<¦··h··»
##---(string line)-----------#
º·®a14..·i16±·Y·2j·p·»
º·:a14¦··sstring¦···f>······l·sabc¦·····f>··l·#b14©"+"¦··f>··l·s~$c14¦···f>··l·s~$c14¦···f>··l·=count(b14..e14)¦··f>·»
··ÏÏ·ÏÏ·ÏÏ·ÏÏ
··ÏÏ·ÏÏ·ÏÏ·ÏÏ
··ÏÏ·ÏÏ·ÏÏ·ÏÏ
##---(formulas)--------------#
º·®a16..·i18±·x·»
º·:g12¦·····= lit (b12)¦··f|·fy····l·#f(`h)¥¦··ls<¦·»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ
##---(pointers)--------------#
º·®a7..b7±·x·»
º·:a22¦··sreference¦··f^·f.··ls<¦··»
º·:a23¦··sÖr¦·····················f>··l·s&a12¦··»
º··h·j···# ts (ár)¦···············f>··l·#f(`h)¥¦··ls<¦·»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ
##---(table discussion)------#
º·:b17¦··»
º·····si integrated the ¶type check¶ into the table¦·······f|·ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h·»
º··j··sbelow. so b12 is nlit. then, also grouped¦········f|·ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h·»
º··j··sinto num (all numeric) and lit (all literals)¦······f|·ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h·»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ
··ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·®a17..·i19±·x·»
##---(literal type)----------#
º·:var r¦··s&a12¦··:a12¦··»
º·:note #¦··»
º·:note JC,source ÔRE¦·»
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
º·:note JA,target ÔUj¦·»
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
º·:note CB-type string literal ÕOQ¦·»
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
º·:note CB-therefore string ÕOX¦·»
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
º·:note CB-and also literal ÕjO¦·»
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
##---(like type)-------------#
º·:var r¦··s&d12¦··:d12¦··»
º·:note #¦··»
º·:note Db,source ÔRE¦·»
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
º·:note Dc,target ×Ji¦·»
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
º·:note cb-numeric like formula ÕFS¦·»
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
º·:note cb-therefore number ÕFX¦·»
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
º·:note cb-and like ÕdS¦·»
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
º·:note cb-and formula ÕdU¦·»
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
##---(pointer type)----------#
º·:var r¦··s&i4¦···:i4¦···»
º·:note #¦··»
º·:note gb,source ÔRE¦·»
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
º·:note gc,target Ôjt¦·»
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
º·:note ob-normal reference ÕcQ¦·»
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
º·:note ob-therefore pointer ÕcX¦·»
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
##===[[ CELL INFO AND ADDRESSING ]]============================================#
##:unskip¦
º·®a1..i38±·x·»
º·:note #¦··»
##---(introduction)-------------#
º·:a2¦···»
º·····spointers to fixed locations are useful, but¦········f|·ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h·»
º··j··sreal power comes from calculated addresses which¦···f|·ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h·»
º··j··sbring massive flexibility¦··························f|·ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··6h·»
j·ÏÏ·ÏÏ·ÏÏ·ÏÏ
··ÏÏ·ÏÏ·ÏÏ·ÏÏ
##---(data table)---------------#
{
º·:b14¦···sdeg¦··f>··l·ssin¦··f>f.··l·scos¦··f>f.··l·stan¦··f>f.··l·ssec¦··f>f.··l·scrd¦··f>f.··l·srad¦··f>f.··»
º·0·l·j···+0¦····f>··j·=`k+¥15¦··f>·y··8(jp)··»
º·:c15¦···=ù($b15)¦··ff·f3···l·=ý($b15)¦··ff·f3···l·=ú($b15)¦··ff·f3···l·=sec($b15)¦··ff·f3···l·=crd($b15)¦··ff·f3···l·=rad($b15)¦··ff·f3··»
º·:c16¦···s~`k'¦¦····ff·f3··y··5(lp)··»
º·:c16¦···v·5l·y··8(jp)··»
}
##---(make reference)-----------#
º·:d6¦···»
º·····sstart with a highly varied data table¦··············f|·ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··5h·»
º··j··sand a reference into the middle¦····················f|·ls<¦··ls<¦··ls<¦··ls<¦··ls<¦··5h·»
º·:a8¦···sÖr¦·········f>··l·s&e19¦··»
··ÏÏ·ÏÏ·ÏÏ·ÏÏ
º·:note ci,source ÔRp¦·»
ÏÏ·ÏÏ·ÏÏ
º·:note cg,target ÔD5¦·»
ÏÏ·ÏÏ·ÏÏ
º·:note jh-tan of 60̦·······················»
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
º·:note #¦··»
##---(cell info)----------------#
º·:a27¦···sfunc¦··f|f.··l·sr¦··f|f.························»
ÏÏ·ÏÏ·ÏÏ
º·:a29¦···scontent¦··f|····l·# p (r)¦··f|······»
ÏÏ·ÏÏ·ÏÏ
º·:a31¦···su¦········f|····l·= u (r)¦··f|······l·#f(`h)¥¦··ls<¦··lsu = universe/tab¦····ls<¦··ls<¦··5h··»
ÏÏ·ÏÏ·ÏÏ
º·:a33¦···sx¦········f|····l·= x (r)¦··f|······l·#f(`h)¥¦··ls<¦··lsstarts at zero (0)¦··ls<¦··ls<¦··5h··»
ÏÏ·ÏÏ·ÏÏ
º·:a35¦···sy¦········f|····l·= y (r)¦··f|······l·#f(`h)¥¦··ls<¦··lsstarts at zero (0)¦··ls<¦··ls<¦··5h··»
ÏÏ·ÏÏ·ÏÏ
º·:a37¦···slabel¦····f|····l·# label (r)¦··f|··l·#f(`h)¥¦··ls<¦··2h··»
ÏÏ·ÏÏ·ÏÏ
##---(pointer info)-------------#
º·®c27..i38±·x·»
º·:c27¦···sár¦··f|f.·······························»
ÏÏ·ÏÏ·ÏÏ
º·:c29¦···= ár¦······f|·fff3·l·#f(`h)¥¦··ls<¦··2h··»
ÏÏ·ÏÏ·ÏÏ
º·:c31¦···= u (ár)¦··f|······l·#f(`h)¥¦··ls<¦··lsu = universe/tab¦····ls<¦··ls<¦··5h··»
ÏÏ·ÏÏ·ÏÏ
º·:c33¦···= x (ár)¦··f|······l·#f(`h)¥¦··ls<¦··lsstarts at zero (0)¦··ls<¦··ls<¦··5h··»
ÏÏ·ÏÏ·ÏÏ
º·:c35¦···= y (ár)¦··f|······l·#f(`h)¥¦··ls<¦··lsstarts at zero (0)¦··ls<¦··ls<¦··5h··»
ÏÏ·ÏÏ·ÏÏ
º·:c37¦···# label (ár)¦··f|··l·#f(`h)¥¦··ls<¦··2h··»
ÏÏ·ÏÏ·ÏÏ
ÏÏ·ÏÏ·ÏÏ
##---(relative)-----------------#
º·®a27..i38±·x·»
º·:note h5,origin ÖD5¦·»
ÏÏ·ÏÏ·ÏÏ
º·®c5..i13±··x·»
º·:d6¦···sÕøx¦··f>··j·-2¦···kl··sÕøy¦··f>··j·-3¦··kl··s ø (r) for relative¦··ls<¦··ls<¦··ls<¦··»
º·:d27¦···scalculated addresses/references¦·····ls<¦··ls<¦··ls<¦··3h·j····»
ÏÏ·ÏÏ·ÏÏ
º·:e29¦···srel¦······f>f.·······························»
ÏÏ·ÏÏ·ÏÏ
º·:d31¦···sx-only¦··f>··l·f>··= r2x (ár, øx)¦······ff·f3···l·#f(`h)¥¦··ls<¦··ls<¦··3h·»
º·:note h5,origin ÖD5¦·» ÏÏ·ÏÏ·ÏÏ ÏÏ·ÏÏ·ÏÏ
º·:note NL,formula ÖFO¦·» ÏÏ·ÏÏ·ÏÏ ÏÏ·ÏÏ·ÏÏ
º·:note SL,ref ×Vn¦·» ÏÏ·ÏÏ·ÏÏ ÏÏ·ÏÏ·ÏÏ
º·:note SK,vars ÔLq¦·» ÏÏ·ÏÏ·ÏÏ ÏÏ·ÏÏ·ÏÏ
º·:note NK,CALCREF ÕM5¦·» ÏÏ·ÏÏ·ÏÏ ÏÏ·ÏÏ·ÏÏ
º·:note #¦··»
º·:d33¦···sy-only¦··f>··l·f>··= r2y (ár, øy)¦······ff·f3···l·#f(`h)¥¦··ls<¦··ls<¦··3h·»
º·:note h5,origin ÖD5¦·» ÏÏ·ÏÏ·ÏÏ
º·:note NL,formula ÖFR¦·» ÏÏ·ÏÏ·ÏÏ
º·:note SL,ref ×Vn¦·» ÏÏ·ÏÏ·ÏÏ