-
Notifications
You must be signed in to change notification settings - Fork 0
/
mufref.html
4256 lines (3535 loc) · 147 KB
/
mufref.html
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
<html>
<head>
<title>The MUCK Manual: MUF Refrence</title>
</head>
<body bgcolor="#FFFFFF">
<center>
<a href="mufcomp.html">prev</a>|
<a href="toc.html">toc</a>|
<a href="muflibref.html">next</a>
</center>
<table>
<tr>
<td width="20%"> </tc>
<td>
<!-- BODY CONTENT HERE -->
<p><b>3.2.5 MUF Reference</b></p>
<p><center><nobr>
[<a href="#a">A</a>
| <a href="#b">B</a>
| <a href="#c">C</a>
| <a href="#d">D</a>
| <a href="#e">E</a>
| <a href="#f">F</a>
| <a href="#g">G</a>
| <a href="#h">H</a>
| <a href="#i">I</a>
| <a href="#j">J</a>
| <a href="#k">K</a>
| <a href="#l">L</a>
| <a href="#m">M</a>
| <a href="#n">N</a>
| <a href="#o">O</a>
| <a href="#p">P</a>
| <a href="#q">Q</a>
| <a href="#r">R</a>
| <a href="#s">S</a>
| <a href="#t">T</a>
| <a href="#u">U</a>
| <a href="#v">V</a>
| <a href="#w">W</a>
| <a href="#x">X</a>
| <a href="#y">Y</a>
| <a href="#z">Z</a>
]</nobr></center></p>
<p>Note: Some listed functions are only available in MUCK server version
fb6.0 and following. Such cases are marked with the notation `(fb6.0+)'
in individual entries.</p>
<p>
<center>
<table border="0" width="98%">
<tr>
<td colspan="5"><em>Array-Handling Primitives:</em></code></td>
</tr><tr>
<td><code><a href="#array_count"><nobr>array_count</a> </nobr></code></td>
<td><code><a href="#array_delitem"><nobr>array_delitem</a> </nobr></code></td>
<td><code><a href="#array_delrange"><nobr>array_delrange</a> </nobr></code></td>
<td><code><a href="#array_explode"><nobr>array_explode</a> </nobr></code></td>
<td><code><a href="#array_first"><nobr>array_first</a> </nobr></code></td>
</tr><tr>
<td><code><a href="#array_getitem"><nobr>array_getitem</a> </nobr></code></td>
<td><code><a href="#array_getrange"><nobr>array_getrange</a> </nobr></code></td>
<td><code><a href="#array_insertitem"><nobr>array_insertitem</a> </nobr></code></td>
<td><code><a href="#array_insertrange"><nobr>array_insertrange</a> </nobr></code></td>
<td><code><a href="#array_keys"><nobr>array_keys </a></nobr></code></td>
</tr><tr>
<td><code><a href="#array_last"><nobr>array_last</a> </nobr></code></td>
<td><code><a href="#array_make"><nobr>array_make</a> </nobr></code></td>
<td><code><a href="#array_make_dict"><nobr>array_make_dict</a> </nobr></code></td>
<td><code><a href="#array_ndiff"><nobr>array_ndiff</a> </nobr></code></td>
<td><code><a href="#array_next"><nobr>array_next</a> </nobr></code></td>
</tr><tr>
<td><code><a href="#array_nintersect"><nobr>array_nintersect</a> </nobr></code></td>
<td><code><a href="#array_notify"><nobr>array_notify</a> </nobr></code></td>
<td><code><a href="#array_nunion"><nobr>array_nunion</a> </nobr></code></td>
<td><code><a href="#array_prev"><nobr>array_prev</a> </nobr></code></td>
<td><code><a href="#array_setitem"><nobr>array_setitem</a> </nobr></code></td>
</tr><tr>
<td><code><a href="#array_setrange"><nobr>array_setrange</a> </nobr></code></td>
<td><code><a href="#array_vals"><nobr>array_vals</a> </nobr></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>Bitwise Operators</em>:</code></td>
</tr><tr>
<td><code><a href="#bitand">bitand </a></code></td>
<td><code><a href="#bitor">bitor</a></code></td>
<td><code><a href="#bitshift">bitshift</a></code></td>
<td><code><a href="#bitxor">bitxor </a></code></td>
<td><code> </code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>Connection-Handling Primitives:</em></code></td>
</tr><tr>
<td><code><a href="#awake_">awake?</a></code></td>
<td><code><a href="#concount">concount </a></code></td>
<td><code><a href="#condbref">condbref </a></code></td>
<td><code><a href="#conidle">conidle </a></code></td>
<td><code><a href="#contime">contime </a></code></td>
</tr><tr>
<td><code><a href="#conhost">conhost </a></code></td>
<td><code><a href="#conboot">conboot </a></code></td>
<td><code><a href="#connotify">connotify </a></code></td>
<td><code><a href="#condescr">condescr </a></code></td>
</tr><tr>
<td><code><a href="#descrflush">descrflush </a></code></td>
<td><code><a href="#descriptors">descriptors </a></code></td>
<td><code><a href="#online">online </a></code></td>
<td><code><a href="#nextdescr">nextdescr</a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>Control Structures:</em></code></td>
</tr><tr>
<td><code><a href="#abort">abort </a></code></td>
<td><code><a href="#begin">begin </a></code></td>
<td><code><a href="#break">break </a></code></td>
<td><code><a href="#call">call </a></code></td>
<td><code><a href="#continue">continue </a></code></td>
</tr><tr>
<td><code><a href="#for">for</a></code></td>
<td><code><a href="#else">else </a></code></td>
<td><code><a href="#execute">execute </a></code></td>
<td><code><a href="#exit">exit </a></code></td>
<td><code><a href="#if">if </a></code></td>
</tr><tr>
<td><code><a href="#jmp">jmp </a></code></td>
<td><code><a href="#kill">kill</a></code></td>
<td><code><a href="#repeat">repeat </a></code></td>
<td><code><a href="#then">then </a></code></td>
<td><code><a href="#until">until </a></code></td>
</tr><tr>
<td><code><a href="#while">while </a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>Data Conversion Primitives:</em></code></td>
</tr><tr>
<td><code><a href="#atoi">atoi </a></code></td>
<td><code><a href="#ctoi">ctoi </a></code></td>
<td><code><a href="#dbref">dbref </a></code></td>
<td><code><a href="#float">float </a></code></td>
<td><code><a href="#ftostr">ftostr </a></code></td>
</tr><tr>
<td><code><a href="#int">int </a></code></td>
<td><code><a href="#intostr">intostr </a></code></td>
<td><code><a href="#itoc">itoc </a></code></td>
<td><code><a href="#stod">stod </a></code></td>
<td><code><a href="#strtof">strtof</a></code></td>
</tr><tr>
<td><code><a href="#variable">variable </a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>Error-Handling Primitives:</em></code></td>
</tr><tr>
<td><code><a href="#clear">clear </a></code></td>
<td><code><a href="#clear_error">clear_error </a></code></td>
<td><code><a href="#error_">error?</a></code></td>
<td><code><a href="#error_bit">error_bit </a></code></td>
<td><code><a href="#error_name">error_name </a></code></td>
</tr><tr>
<td><code><a href="#error_num">error_num </a></code></td>
<td><code><a href="#error_str">error_str </a></code></td>
<td><code><a href="#is_set_">is_set?</a></code></td>
<td><code><a href="#set_error">set_error</a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>Input/Output Primitives:</em></code></td>
</tr><tr>
<td><code><a href="#notify">notify </a></code></td>
<td><code><a href="#notify_except">notify_except </a></code></td>
<td><code><a href="#notify_exclude">notify_exclude</a></code></td>
<td><code><a href="#read">read </a></code></td>
<td><code><a href="#tread">tread </a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>Lock-Handling Primitives:</em></code></td>
</tr><tr>
<td><code><a href="#getlockstr">getlockstr </a></code></td>
<td><code><a href="#locked_">locked?</a></code></td>
<td><code><a href="#parselock">parselock </a></code></td>
<td><code><a href="#prettylock">prettylock </a></code></td>
<td><code><a href="#setlockstr">setlockstr </a></code></td>
</tr><tr>
<td><code><a href="#testlock">testlock </a></code></td>
<td><code><a href="#unparselock">unparselock</a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>Math and Comparison Primitives:</em></code></td>
</tr><tr>
<td><code><a href="#math">+ - / % </a></code></td>
<td><code><a href="#comp">< > </a></code></td>
<td><code><a href="#comp">= </a></code></td>
<td><code><a href="#comp"><= </a></code></td>
<td><code><a href="#comp">>= </a></code></td>
</tr><tr>
<td><code><a href="#acos">acos </a></code></td>
<td><code><a href="#and">and </a></code></td>
<td><code><a href="#asine">asine </a></code></td>
<td><code><a href="#atan">atan </a></code></td>
<td><code><a href="#atan2">atan2 </a></code></td>
</tr><tr>
<td><code><a href="#ceil">ceil </a></code></td>
<td><code><a href="#cos">cos </a></code></td>
<td><code><a href="#dbcmp">dbcmp</a></code></td>
<td><code><a href="#dist3d">dist3d</a></code></td>
<td><code><a href="#exp">exp </a></code></td>
</tr><tr>
<td><code><a href="#fabs">fabs</a></code></td>
<td><code><a href="#floor">floor </a></code></td>
<td><code><a href="#frand">frand </a></code></td>
<td><code><a href="#getseed">getseed </a></code></td>
<td><code><a href="#inf">inf </a></code></td>
</tr><tr>
<td><code><a href="#log">log </a></code></td>
<td><code><a href="#log10">log10 </a></code></td>
<td><code><a href="#modf">modf </a></code></td>
<td><code><a href="#not">not </a></code></td>
<td><code><a href="#number_">number?</a></code></td>
</tr><tr>
<td><code><a href="#or">or </a></code></td>
<td><code><a href="#pi">pi </a></code></td>
<td><code><a href="#polar_to_xyz">polar_to_xyz </a></code></td>
<td><code><a href="#pow">pow </a></code></td>
<td><code><a href="#random">random </a></code></td>
</tr><tr>
<td><code><a href="#round">round </a></code></td>
<td><code><a href="#setseed">setseed </a></code></td>
<td><code><a href="#sine">sine </a></code></td>
<td><code><a href="#sqrt">sqrt</a></code></td>
<td><code><a href="#srand">srand</a></code></td>
</tr><tr>
<td><code><a href="#strcmp">strcmp </a></code></td>
<td><code><a href="#stringcmp">stringcmp </a></code></td>
<td><code><a href="#strncmp">strncmp </a></code></td>
<td><code><a href="#tan">tan </a></code></td>
<td><code><a href="#xyz_to_polar">xyz_to_polar </a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>Message-Management Primitives:</em></code></td>
</tr><tr>
<td><code><a href="#desc">desc </a></code></td>
<td><code><a href="#drop">drop </a></code></td>
<td><code><a href="#fail">fail </a></code></td>
<td><code><a href="#name">name </a></code></td>
<td><code><a href="#odrop">odrop </a></code></td>
</tr><tr>
<td><code><a href="#ofail">ofail </a></code></td>
<td><code><a href="#osucc">osucc </a></code></td>
<td><code><a href="#setdesc">setdesc </a></code></td>
<td><code><a href="#setdrop">setdrop </a></code></td>
<td><code><a href="#setfail">setfail </a></code></td>
</tr><tr>
<td><code><a href="#setname">setname </a></code></td>
<td><code><a href="#setodrop">setodrop</a></code></td>
<td><code><a href="#setofail">setofail </a></code></td>
<td><code><a href="#setosucc">setosucc </a></code></td>
<td><code><a href="#succ">succ </a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>Miscellaneous Primitives:</em></code></td>
</tr><tr>
<td><code><a href="#addpennies">addpennies </a></code></td>
<td><code><a href="#checkargs">checkargs </a></code></td>
<td><code><a href="#checkpassword">checkpassword</a></code></td>
<td><code><a href="#contents">contents </a></code></td>
<td><code><a href="#copyobj">copyobj </a></code></td>
</tr><tr>
<td><code><a href="#dbtop">dbtop </a></code></td>
<td><code><a href="#exits">exits </a></code></td>
<td><code><a href="#flag_">flag?</a></code></td>
<td><code><a href="#force">force </a></code></td>
<td><code><a href="#getlink">getlink </a></code></td>
</tr><tr>
<td><code><a href="#interp">interp</a></code></td>
<td><code><a href="#location">location </a></code></td>
<td><code><a href="#match">match </a></code></td>
<td><code><a href="#mlevel">mlevel </a></code></td>
<td><code><a href="#movepennies">movepennies </a></code></td>
</tr><tr>
<td><code><a href="#moveto">moveto </a></code></td>
<td><code><a href="#newexit">newexit </a></code></td>
<td><code><a href="#newobject">newobject </a></code></td>
<td><code><a href="#newroom">newroom </a></code></td>
<td><code><a href="#next">next </a></code></td>
</tr><tr>
<td><code><a href="#nextowned">nextowned </a></code></td>
<td><code><a href="#owner">owner </a></code></td>
<td><code><a href="#part_pmatch">part_pmatch</a></code></td>
<td><code><a href="#pennies">pennies </a></code></td>
<td><code><a href="#pmatch">pmatch </a></code></td>
</tr><tr>
<td><code><a href="#prog">prog </a></code></td>
<td><code><a href="#recycle">recycle </a></code></td>
<td><code><a href="#rmatch">rmatch </a></code></td>
<td><code><a href="#set">set </a></code></td>
<td><code><a href="#setlink">setlink </a></code></td>
</tr><tr>
<td><code><a href="#setown">setown </a></code></td>
<td><code><a href="#stats">stats </a></code></td>
<td><code><a href="#sysparm">sysparm </a></code></td>
<td><code><a href="#textattr">textattr </a></code></td>
<td><code><a href="#trig">trig </a></code></td>
</tr><tr>
<td><code><a href="#version">version </a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>Multitasking:</em></code></td>
</tr><tr>
<td><code><a href="#background">background </a></code></td>
<td><code><a href="#bg_mode">bg_mode </a></code></td>
<td><code><a href="#fg_mode">fg_mode </a></code></td>
<td><code><a href="#fork">fork </a></code></td>
<td><code><a href="#foreground">foreground </a></code></td>
</tr><tr>
<td><code><a href="#kill">kill </a></code></td>
<td><code><a href="#mode">mode </a></code></td>
<td><code><a href="#pr_mode">pr_mode</a></code></td>
<td><code><a href="#preempt">preempt </a></code></td>
<td><code><a href="#queue">queue </a></code></td>
</tr><tr>
<td><code><a href="#setmode">setmode </a></code></td>
<td><code><a href="#sleep">sleep </a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>Property-Handling Primitives:</em></code></td>
</tr><tr>
<td><code><a href="#addprop">addprop </a></code></td>
<td><code><a href="#envpropstr">envpropstr </a></code></td>
<td><code><a href="#getlockstr">getlockstr </a></code></td>
<td><code><a href="#getpropfval">getpropfval </a></code></td>
<td><code><a href="#getpropstr">getpropstr </a></code></td>
</tr><tr>
<td><code><a href="#getpropval">getpropval </a></code></td>
<td><code><a href="#nextprop">nextprop </a></code></td>
<td><code><a href="#propdir_">propdir?</a></code></td>
<td><code><a href="#remove_prop">remove_prop </a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>Stack-Handling Primitives:</em></code></td>
</tr><tr>
<td><code><a href="#depth">depth </a></code></td>
<td><code><a href="#dup">dup </a></code></td>
<td><code><a href="#dupn">dupn </a></code></td>
<td><code><a href="#ldup">ldup </a></code></td>
<td><code><a href="#lreverse">lreverse </a></code></td>
</tr><tr>
<td><code><a href="#over">over </a></code></td>
<td><code><a href="#pick">pick </a></code></td>
<td><code><a href="#pop">pop </a></code></td>
<td><code><a href="#popn">popn</a></code></td>
<td><code><a href="#put">put </a></code></td>
</tr><tr>
<td><code><a href="#reverse">reverse </a></code></td>
<td><code><a href="#rot">rot </a></code></td>
<td><code><a href="#rotate">rotate </a></code></td>
<td><code><a href="#swap">swap </a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>String-Handling Primitives:</em></code></td>
</tr><tr>
<td><code><a href="#explode">explode </a></code></td>
<td><code><a href="#fmtstring">fmtstring </a></code></td>
<td><code><a href="#instr">instr </a></code></td>
<td><code><a href="#instring">instring </a></code></td>
<td><code><a href="#midstr">midstr </a></code></td>
</tr><tr>
<td><code><a href="#pronoun_sub">pronoun_sub </a></code></td>
<td><code><a href="#tolower">tolower </a></code></td>
<td><code><a href="#toupper">toupper </a></code></td>
<td><code><a href="#rinstr">rinstr </a></code></td>
<td><code><a href="#rinstring">rinstring </a></code></td>
</tr><tr>
<td><code><a href="#smatch">smatch </a></code></td>
<td><code><a href="#split">split </a></code></td>
<td><code><a href="#strcat">strcat </a></code></td>
<td><code><a href="#strcut">strcut </a></code></td>
<td><code><a href="#strdecrytp">strdecrypt </a></code></td>
</tr><tr>
<td><code><a href="#strencrypt">strencrypt </a></code></td>
<td><code><a href="#stringpfx">stringpfx</a></code></td>
<td><code><a href="#strip">strip </a></code></td>
<td><code><a href="#striplead">striplead </a></code></td>
<td><code><a href="#striptail">striptail </a></code></td>
</tr><tr>
<td><code><a href="#strlen">strlen </a></code></td>
<td><code><a href="#subst">subst </a></code></td>
<td><code><a href="#unparseobj">unparseobj </a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>Time Primitives:</em></code></td>
</tr><tr>
<td><code><a href="#systime">systime </a></code></td>
<td><code><a href="#timesplit">timesplit </a></code></td>
<td><code><a href="#timefmt">timefmt </a></code></td>
<td><code><a href="#date">date </a></code></td>
<td><code><a href="#gmtoffset">gmtoffset </a></code></td>
</tr><tr>
<td><code><a href="#time">time </a></code></td>
<td><code><a href="#timestamps">timestamps</a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>Type-Checking Primitives:</em></code></td>
</tr><tr>
<td><code><a href="#array_">array?</a></code></td>
<td><code><a href="#dbref_">dbref?</a></code></td>
<td><code><a href="#dictionary_">dictionary?</a></code></td>
<td><code><a href="#exit_">exit?</a></code></td>
<td><code><a href="#flag_">flag?</a></code></td>
</tr><tr>
<td><code><a href="#float_">float?</a></code></td>
<td><code><a href="#int_">int?</a></code></td>
<td><code><a href="#ispid_">ispid?</a></code></td>
<td><code><a href="#lock_">lock?</a></code></td>
<td><code><a href="#ok_">ok?</a></code></td>
</tr><tr>
<td><code><a href="#player_">player?</a></code></td>
<td><code><a href="#program_">program?</a></code></td>
<td><code><a href="#propdir_">propdir?</a></code></td>
<td><code><a href="#number_">number?</a></code></td>
<td><code><a href="#room_">room?</a></code></td>
</tr><tr>
<td><code><a href="#string_">string?</a></code></td>
<td><code><a href="#thing_">thing?</a></code></td>
</tr><tr>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
<td><code> </code></td>
</tr><tr>
<td colspan="5"><em>Variable-Handling Primitives:</em></code></td>
</tr><tr>
<td><code><a href="#fetch">@ </a></code></td>
<td><code><a href="#store">! </a></code></td>
<td><code><a href="#localvar">localvar </a></code></td>
<td><code><a href="#lvar">lvar </a></code></td>
<td><code><a href="#public">public </a></code></td>
</tr><tr>
<td><code><a href="#var">var </a></code></td>
<td><code><a href="#variable">variable </a></code></td>
</tr>
</table>
</center>
</p>
<p><hr></p>
<a name="a">
<p><center><nobr>
[<a href="#a">A</a>
| <a href="#b">B</a>
| <a href="#c">C</a>
| <a href="#d">D</a>
| <a href="#e">E</a>
| <a href="#f">F</a>
| <a href="#g">G</a>
| <a href="#h">H</a>
| <a href="#i">I</a>
| <a href="#j">J</a>
| <a href="#k">K</a>
| <a href="#l">L</a>
| <a href="#m">M</a>
| <a href="#n">N</a>
| <a href="#o">O</a>
| <a href="#p">P</a>
| <a href="#q">Q</a>
| <a href="#r">R</a>
| <a href="#s">S</a>
| <a href="#t">T</a>
| <a href="#u">U</a>
| <a href="#v">V</a>
| <a href="#w">W</a>
| <a href="#x">X</a>
| <a href="#y">Y</a>
| <a href="#z">Z</a>
]</nobr></center></p>
<p><hr></p>
<a name="math">
<p><code>+ - * / % ( x1 x2 -- i )</code></p>
<p>These words perform arithmetic operations on integer and floating
point numbers. </p>
<p><table>
<tr>
<td rowspan="6"> </td>
</tr><tr>
<td><code>+ is addition:</code></td>
<td><code>x1 + x2 </code></td>
</tr><tr>
<td><code>- is subtraction:</code></td>
<td><code>x1 - x2</code></td>
</tr><tr>
<td><code>* is multiplication: </code></td>
<td><code>x1 times x2, or x1 * x2</code></td>
</tr><tr>
<td><code>/ is division: </code></td>
<td><code>x1 divided by x2, or x1 / x2</code></td>
</tr><tr>
<td><code>% is modulo: </code></td>
<td><code>remainter of x1 / x2, or x1 % x2</code></td>
</tr>
</table></p>
<p>The result of an integer division is truncated of fractions.</p>
<p>Modulo cannot be used on floating point values: see
<a href="#modf"><code>MODF.</code></a> </p>
<p>All math operations may also be performed where <code>x1</code> is a
variable type. This is mainly useful in calculating an offset for a
variable array. [<a href="#top">top</a>]</p><hr>
<a name="comp">
<p><code>< > = <= >= ( x1 x2 -- i )</code></p>
<p>Perform relational operations on integers or dbrefs <code>x1</code>
and <code>x2.</code> These return <code>i</code> as <code>1</code> if
the expression is true, and <code>i</code> as <code>0</code>
otherwise. [<a href="#top">top</a>]</p><hr>
<a name="fetch">
<p><code>@ ( v -- x )</p></code>
<p>Retrieves variable <code>v's</code> value <code>x.</code> (Pronounced
`fetch'.) [<a href="#top">top</a>]</p><hr>
<a name="store">
<p><code>! ( x v -- )</p></code>
<p>Sets variable <code>v's</code> value to <code>x.</code> See also <a
href="#variable"><code>VARIABLE,</code></a> <a
href="#var"><code>VAR,</code></a> <a href="#lvar"><code>LVAR,</code></a>
<a href="#localvar"><code>LOCALVAR,</code></a> and <a
href="#miscellaneous"><code>miscellaneous.</code></a> (Pronounced
`store'.) [<a href="#top">top</a>]</p><hr>
<a name="abort">
<p><code>ABORT ( s -- )</p></code>
<p>Aborts the MUF program with an error. For example, <code>`"Bad
vibes." abort'</code> would stop the MUF program and tell the user a
message like:</p>
<p><code>
Programmer error. Please tell Revar the following message:<br>
#1234 (line 23) ABORT: Bad vibes.
</code></p>
<p>[<a href="#top">top</a>]</p><hr>
<a name="acos">
<p><code>ACOS ( f -- f' )</p></code>
<p>Returns the inverse cosine of <code>f</code>. (fb6.0+) [<a href="#top">top</a>]</p><hr>
<a name="addpennies">
<p><code>ADDPENNIES ( d i -- )</p></code>
<p><code>d</code> must be a player or thing object. Adds <code>i</code>
pennies to object <code>d.</code> Without Wizard permissions,
<code>addpennies</code> may only give players pennies, limited to
between zero and <code>MAX_PENNIES.</code> [<a href="#top">top</a>]</p><hr>
<a name="addprop">
<p><code>ADDPROP ( d s1 s2 i -- )</p></code>
<p>Sets property associated with <code>s1</code> in object
<code>d.</code> Note that if <code>s2</code> is null <code>"",</code>
then <code>i</code> will be used. Otherwise, <code>s2</code> is always
used. All four parameters must be on the stack; none may be omitted. If
the effective user of the program does not control the object in
question and the property begins with an underscore <code>`_',</code>
the property cannot be changed. The same goes for properties beginning
with a dot <code>`.'</code> which cannot be read without permission. If
you store values, you must ensure that it they are never zero.
Otherwise, when the user stores a non-zero number into the string field,
(users may only access string fields) the next time TinyMUCK is dumped
and loaded up again, the value field will be replaced with
<code>atoi</code> (string field). If it is necessary to store zero, it
is safer to just add 1 to everything. [<a href="#top">top</a>]</p><hr>
<a name="address_">
<p><code>ADDRESS? ( ? -- i )</code></p>
<p>Returns true if the top stack item is a function address.
[<a href="#top">top</a>]</p><hr>
<a name="and">
<p><code>AND ( x y -- i )</code></p>
<p>Performs the boolean `and' operation on <code>x</code> and
<code>y,</code> returning <code>i</code> as <code>1</code> if both
<code>i1</code> and <code>i2</code> are <code>TRUE,</code> and returning
i as <code>0</code> otherwise. [<a href="#top">top</a>]</p><hr>
<a name="array_">
<p><code>ARRAY? ( ? -- i ) </code></p>
Returns true if the top item on the stack is an array. (fb6.0+)
[<a href="#top">top</a>]</p><hr>
<a name="array_count">
<p><code>ARRAY_COUNT ( a -- i ) </code></p>
<p>Returns a count of the items in an array. (fb6.0+) [<a
href="#top">top</a>]</p><hr>
<a name="array_delitem">
<p><code>ARRAY_DELITEM ( a @ -- a' ) </code></p>
<p>Removes a given item from an array. (fb6.0+) [<a
href="#top">top</a>]</p><hr>
<a name="array_delrange">
<p><code>ARRAY_DELRANGE ( a @ @ -- a' )</code> </p>
<p>Deletes a range of items from an array, between two indexes,
inclusive. Returns the resulting array. (fb6.0+) [<a
href="#top">top</a>]</p><hr>
<a name="array_first">
<p><code>ARRAY_FIRST ( a -- @ i ) </code></p>
<p>Returns first the index in array, and a boolean. Bool is false if no
items are in array. (fb6.0+) [<a href="#top">top</a>]</p><hr>
<a name="array_explode">
<p><code>ARRAY_EXPLODE ( a -- {@ ?} ) </code></p>
<p>Explodes array into stackrange of index/value pairs, such as
<code>"idx0" "val0" "idx1" "val1" 2</code>. (fb6.0+) [<a
href="#top">top</a>]</p><hr>
<a name="array_getitem">
<p><code>ARRAY_GETITEM ( a @ -- ? ) </code></p>
<p>Gets a given item from an array. (fb6.0+) [<a
href="#top">top</a>]</p><hr>
<a name="array_getrange">
<p><code>ARRAY_GETRANGE ( a @ @ -- a' ) </code></p>
<p>Gets range between two indexes (inclusive) from an array, returning
it as an array. (fb6.0+) [<a href="#top">top</a>]</p><hr>
<a name="array_insertitem">
<p><code>ARRAY_INSERTITEM ( ? a @ -- a') </code></p>
<p>Inserts a given value into an array. (fb6.0+) [<a
href="#top">top</a>]</p><hr>
<a name="array_insertrange">
<p><code>ARRAY_INSERTRANGE ( a1 @ a2 -- a' ) </code></p>
<p>Inserts items from array <code>a2</code> into <code>a1,</code>
starting at the given index. Returns the resulting array. (fb6.0+)
[<a href="#top">top</a>]</p><hr>
<a name="array_keys">
<p><code>ARRAY_KEYS ( a -- {@} ) </code></p>
<p>Returns the keys of an array in a stackrange. (fb6.0+) [<a
href="#top">top</a>]</p><hr>
<a name="array_last">
<p><code>ARRAY_LAST ( a -- @ i ) </code></p>
<p>Returns last index in array, and a boolean. Bool is false if no items
are in array. (fb6.0+) [<a href="#top">top</a>]</p><hr>
<a name="array_make">
<p><code>ARRAY_MAKE ( {?} -- a ) </code></p>
<p>Makes a list array from a stackrange. (fb6.0+) [<a
href="#top">top</a>]</p><hr>
<a name="array_make_dict">
<p><code>ARRAY_MAKE_DICT ( {@ ?} -- a ) </code></p>
<p>Makes a dictionary associative array from a stackrange of index/value
pairs. (fb6.0+) [<a href="#top">top</a>]</p><hr>
<a name="array_ndiff">
<p><code>ARRAY_NDIFF ( {a} -- a )</code></p>
<p>Returns a list array, containing the difference of all the given arrays.
Multiple arrays are consecutively processed against the results of the
previous difference, from the top of the stack down. (fb6.0+) [<a
href="#top">top</a>]</p><hr>
<a name="array_nintersect">
<p><code>ARRAY_NINTERSECT ( {a} -- a ) </code></p>
<p>Return a list array, containing the intersection of all the given
arrays. Multiple arrays are consecutively processed against the results
of the previous intersection, from the top of the stack down.
(fb6.0+) [<a href="#top">top</a>]</p><hr>
<a name="array_next">
<p><code>ARRAY_NEXT ( a @ -- @ i ) </code></p>
<p>Returns the next index in array, following index <code>a,</code> and
a boolean. Bool is false if no items left. (fb6.0+) [<a
href="#top">top</a>]</p><hr>
<a name="array_notify">
<p><code>ARRAY_NOTIFY (a1 a2 -- )</code></p>
<p>Notifies all dbref items in array <code>a2</code> with all string
items in array <code>a1.</code> (fb6.0+) [<a
href="#top">top</a>]</p><hr>
<a name="array_nunion">
<p><code>ARRAY_NUNION ({a} -- a) </code></p>
<p>Returns a list array, containing the union of values of all the given
arrays. (fb6.0+) [<a href="#top">top</a>]</p><hr>
<a name="array_prev">
<p><code>ARRAY_PREV ( a @ -- @ i ) </code></p>
<p>Returns previous index in array, following index <code>a,</code> and
a boolean. Bool is false if no items left. (fb6.0+) [<a
href="#top">top</a>]</p><hr>
<a name="array_setitem">
<p><code>ARRAY_SETITEM ( ? a @ -- a' ) </code></p>
<p>Overwrites item a from array @ with value ?. (fb6.0+) [<a
href="#top">top</a>]</p><hr>
<a name="array_setrange">
<p><code>ARRAY_SETRANGE (a1 @ a2 -- a') </code></p>
<p>Sets items in list <code>a1</code> to values from list
<code>a2,</code> starting at the given index. Returns the resulting
array. (fb6.0+) [<a href="#top">top</a>]</p><hr>
<a name="array_vals">
<p><code>ARRAY_VALS ( a -- {?} ) </code></p>
<p>Returns the values of an array in a stackrange. (fb6.0+) [<a
href="#top">top</a>]</p><hr>
<a name="asine">
<p><code>ASINE ( f -- f' )</code></p>
<p>Returns the inverse cosine of <code>f.</code> Operates in the range
of <code>-pi/2</code> to <code>pi/2.</code> (fb6.0+) [<a
href="#top">top</a>]</p><hr>
<a name="atan">
<p><code>ATAN ( f -- f' )</code></p>
<p>Returns the inverse tangent of <code>f.</code> Operates in the range
of <code>-pi/2</code> to <code>pi/2.</code> (fb6.0+) [<a
href="#top">top</a>]</p><hr>
<a name="atan2">
<p><code>ATAN2 ( fy fx -- f )</code></p>
<p>Equivalent to <a href="#atan"><code>ATAN,</code></a> but takes the signs
of the arguments into account, and avoids division-by-zero errors.
(fb6.0+) [<a href="#top">top</a>]</p><hr>
<a name="atoi">
<p><code>ATOI ( s -- i )</code></p>
<p>Turns string <code>s</code> into integer <code>i.</code> If
<code>s</code> is not a string, then <code>0</code> is pushed onto the
stack. [<a href="#top">top</a>]</p><hr>
<a name="awake_">
<p><code>AWAKE? ( d -- i )</code></p>
<p>Passed a player's dbref, returns the number of connections they have
to the game. This will be <code>0</code> if they are not
connected. [<a href="#top">top</a>]</p><hr>
<a name="b">
<p><center><nobr>
[<a href="#a">A</a>
| <a href="#b">B</a>
| <a href="#c">C</a>
| <a href="#d">D</a>
| <a href="#e">E</a>
| <a href="#f">F</a>
| <a href="#g">G</a>
| <a href="#h">H</a>
| <a href="#i">I</a>
| <a href="#j">J</a>
| <a href="#k">K</a>
| <a href="#l">L</a>
| <a href="#m">M</a>
| <a href="#n">N</a>
| <a href="#o">O</a>
| <a href="#p">P</a>
| <a href="#q">Q</a>
| <a href="#r">R</a>
| <a href="#s">S</a>
| <a href="#t">T</a>
| <a href="#u">U</a>
| <a href="#v">V</a>
| <a href="#w">W</a>
| <a href="#x">X</a>
| <a href="#y">Y</a>
| <a href="#z">Z</a>
]</nobr></center></p>
<a name="background">
<p><code>BACKGROUND ( -- )</code></p>
<p>A way to turn on multitasking. Programs in the background let the
program user go on and be able to do other things while waiting for the
program to finish. You cannot use the <code>READ</code> command in a background
program. Once a program is put into background mode, you cannot set it
into foreground or preempt mode. A program will remain in the background
until it finishes execution. [<a href="#top">top</a>] </p><hr>
<a name="begin">
<p><code>BEGIN ( -- )</code></p>
<p>Marks the beginning of begin-until or begin-repeat loops. [<a
href="#top">top</a>] </p><hr>
<a name="bg_mode">
<p><code>BG_MODE ( -- i )</code><br>
<code>pr_mode </code><br>
<code>fg_mode </code></p>
<p>These are all standard built in defines. They are used with
<code>MODE</code> and <code>SETMODE</code> to show what mode the program
is running in, or to set what mode it will run in. For example,
<code>MODE</code> returns an integer on the stack, that you can compare
against <code>pr_mode,</code> <code>fg_mode,</code> or
<code>bg_mode,</code> to determine what mode the program is in.
<code>pr_mode</code> is defined as <code>0,</code> <code>fg_mode</code>
is defined as <code>1,</code> and <code>bg_mode</code> is defined as
<code>2.</code> [<a href="#top">top</a>]</p><hr>
<a name="bitor">
<p><code>BITOR ( x x -- i )</code></p>
<p>Does a mathematical bitwise or. [<a
href="#top">top</a>]</p><hr>
<a name="bitand">
<p><code>BITAND ( i i -- i )</code></p>
<p>Does a mathematical bitwise and. [<a
href="#top">top</a>]</p><hr>
<a name="bitshift">
<p><code>BITSHIFT ( i i -- i )</code></p>
<p>Shifts the first integer by the second integer's number of bit
positions. This works like the C <code><<</code> operator. If the
second integer is negative, it is equivalent to
<code>>>.</code> [<a href="#top">top</a>]</p><hr>
<a name="bitxor">
<p><code>BITXOR ( i i -- i )</code></p>
<p>Does a mathematical bitwise exclusive or. [<a
href="#top">top</a>]</p><hr>
<a name="break">
<p><code>BREAK ( -- )</code></p>
<p>Breaks out of the innermost loop. Jumps execution to the instruction
after the <code>UNTIL</code> or <code>REPEAT</code> for the current loop. [<a href="#top">top</a>]</p><hr>
<a name="c">
<p><center><nobr>
[<a href="#a">A</a>
| <a href="#b">B</a>
| <a href="#c">C</a>
| <a href="#d">D</a>
| <a href="#e">E</a>
| <a href="#f">F</a>
| <a href="#g">G</a>
| <a href="#h">H</a>
| <a href="#i">I</a>
| <a href="#j">J</a>