Changeset 35778 in project


Ignore:
Timestamp:
07/06/18 19:44:49 (5 months ago)
Author:
kon
Message:

add subsections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/check-errors

    r35777 r35778  
    4545</enscript>
    4646
    47 ==== Usage
     47==== Type Checks Basic
     48
     49===== Usage
    4850
    4951<enscript language=scheme>
     
    5153</enscript>
    5254
    53 ==== check-defined-value
     55===== check-defined-value
    5456
    5557<procedure>(check-defined-value LOC OBJ [ARGNAM]) -> *</procedure>
     
    5759Ensures the {{OBJ}} is non-void, i.e. not an undefined-value.
    5860
    59 ==== check-bound-value
     61===== check-bound-value
    6062
    6163<procedure>(check-bound-value LOC OBJ [ARGNAM]) -> *</procedure>
     
    6668checking is necessary.
    6769
    68 ==== check-minimum-argument-count
     70===== check-minimum-argument-count
    6971
    7072<procedure>(check-minimum-argument-count LOC ARGC MINARGC) -> *</procedure>
     
    7274Does not verify the type of {{ARGC}}, and {{MINARGC}}.
    7375
    74 ==== check-argument-count
     76===== check-argument-count
    7577
    7678<procedure>(check-argument-count LOC ARGC MAXARGC) -> *</procedure>
     
    7880Does not verify the type of {{ARGC}}, and {{MAXARGC}}.
    7981
    80 ==== define-check-type
     82===== define-check-type
    8183
    8284<macro>(define-check-type TYPNAM [TYPE-PRED])</macro>
     
    9799</enscript>
    98100
    99 ==== define-check+error-type
     101===== define-check+error-type
    100102
    101103<macro>(define-check+error-type TYPNAM [TYPE-PRED [TYPMSG]])</macro>
     
    118120</enscript>
    119121
    120 ==== Usage
     122==== Type Checks Numbers
     123
     124===== Usage
    121125
    122126<enscript language=scheme>
     
    124128</enscript>
    125129
    126 ==== check-fixnum
    127 ==== check-positive-fixnum
    128 ==== check-natural-fixnum
    129 ==== check-negative-fixnum
    130 ==== check-non-positive-fixnum
     130===== check-fixnum
     131===== check-positive-fixnum
     132===== check-natural-fixnum
     133===== check-negative-fixnum
     134===== check-non-positive-fixnum
    131135
    132136<procedure>(check-fixnum LOC OBJ [ARGNAM]) --> fixnum</procedure>
     
    136140<procedure>(check-non-positive-fixnum LOC OBJ [ARGNAM]) --> fixnum</procedure>
    137141
    138 ==== check-integer
    139 ==== check-positive-integer
    140 ==== check-natural-integer
    141 ==== check-negative-integer
    142 ==== check-non-positive-integer
     142===== check-integer
     143===== check-positive-integer
     144===== check-natural-integer
     145===== check-negative-integer
     146===== check-non-positive-integer
    143147
    144148<procedure>(check-integer LOC OBJ [ARGNAM]) --> integer</procedure>
     
    148152<procedure>(check-non-positive-integer LOC OBJ [ARGNAM]) --> integer</procedure>
    149153
    150 ==== check-number
    151 ==== check-positive-number
    152 ==== check-natural-number
    153 ==== check-negative-number
    154 ==== check-non-positive-number
     154===== check-number
     155===== check-positive-number
     156===== check-natural-number
     157===== check-negative-number
     158===== check-non-positive-number
    155159
    156160<procedure>(check-number LOC OBJ [ARGNAM]) --> number</procedure>
     
    160164<procedure>(check-non-positive-number LOC OBJ [ARGNAM]) --> number</procedure>
    161165
    162 ==== check-flonum
     166===== check-flonum
    163167
    164168<procedure>(check-flonum LOC OBJ [ARGNAM]) -> flonum</procedure>
    165169
    166 ==== check-open-interval
     170===== check-open-interval
    167171
    168172<procedure>(check-open-interval LOC NUM MINNUM MAXNUM [ARGNAM]) -> *</procedure>
     
    172176Does not verify the type of {{NUM}}, {{MINNUM}}, and {{MAXNUM}}.
    173177
    174 ==== check-closed-interval
     178===== check-closed-interval
    175179
    176180<procedure>(check-closed-interval LOC NUM MINNUM MAXNUM [ARGNAM]) -> *</procedure>
     
    180184Does not verify the type of {{NUM}}, {{MINNUM}}, and {{MAXNUM}}.
    181185
    182 ==== check-half-open-interval
     186===== check-half-open-interval
    183187
    184188<procedure>(check-half-open-interval LOC NUM MINNUM MAXNUM [ARGNAM]) -> *</procedure>
     
    188192Does not verify the type of {{NUM}}, {{MINNUM}}, and {{MAXNUM}}.
    189193
    190 ==== check-half-closed-interval
     194===== check-half-closed-interval
    191195
    192196<procedure>(check-half-closed-interval LOC NUM MINNUM MAXNUM [ARGNAM]) -> *</procedure>
     
    196200Does not verify the type of {{NUM}}, {{MINNUM}}, and {{MAXNUM}}.
    197201
    198 ==== check-range
     202===== check-range
    199203
    200204<procedure>(check-range LOC START END [ARGNAM]) -> number number</procedure>
     
    205209flonum)}}.
    206210
    207 ==== Usage
     211==== Type Checks Structured
     212
     213===== Usage
    208214
    209215<enscript language=scheme>
     
    211217</enscript>
    212218
    213 ==== check-procedure
     219===== check-procedure
    214220
    215221<procedure>(check-procedure LOC OBJ [ARGNAM]) -> *</procedure>
    216222
    217 ==== check-input-port
     223===== check-input-port
    218224
    219225<procedure>(check-input-port LOC OBJ [ARGNAM]) -> *</procedure>
    220226
    221 ==== check-output-port
     227===== check-output-port
    222228
    223229<procedure>(check-output-port LOC OBJ [ARGNAM]) -> *</procedure>
    224230
    225 ==== check-list
     231===== check-list
    226232
    227233<procedure>(check-list LOC OBJ [ARGNAM]) -> *</procedure>
    228234
    229 ==== check-alist
     235===== check-alist
    230236
    231237<procedure>(check-alist LOC OBJ [ARGNAM]) -> *</procedure>
    232238
    233 ==== check-plist
     239===== check-plist
    234240
    235241<procedure>(check-plist LOC OBJ [ARGNAM]) -> *</procedure>
    236242
    237 ==== check-pair
     243===== check-pair
    238244
    239245<procedure>(check-pair LOC OBJ [ARGNAM]) -> *</procedure>
    240246
    241 ==== check-blob
     247===== check-blob
    242248
    243249<procedure>(check-blob LOC OBJ [ARGNAM]) -> *</procedure>
    244250
    245 ==== check-vector
     251===== check-vector
    246252
    247253<procedure>(check-vector LOC OBJ [ARGNAM]) -> *</procedure>
    248254
    249 ==== check-structure
     255===== check-structure
    250256
    251257<procedure>(check-structure LOC OBJ TAG [ARGNAM]) -> *</procedure>
     
    255261{{check-record}} and {{check-record-type}} are essentially synonyms.
    256262
    257 ==== check-string
     263===== check-string
    258264
    259265<procedure>(check-string LOC OBJ [ARGNAM]) -> *</procedure>
    260266
     267==== Type Checks Atoms
     268
     269===== Usage
     270
     271<enscript language=scheme>
     272(import type-checks-atoms)
     273</enscript>
     274
     275===== check-symbol
     276
     277<procedure>(check-symbol LOC OBJ [ARGNAM]) -> *</procedure>
     278
     279===== check-keyword
     280
     281<procedure>(check-keyword LOC OBJ [ARGNAM]) -> *</procedure>
     282
     283===== check-char
     284
     285<procedure>(check-char LOC OBJ [ARGNAM]) -> *</procedure>
     286
     287===== check-boolean
     288
     289<procedure>(check-boolean LOC OBJ [ARGNAM]) -> *</procedure>
     290
     291
     292=== Type Errors
     293
     294==== Argument Conventions
     295
     296{{TYPNAM}} is a {{symbol}} or {{string}}, unless otherwise indicated.
     297
     298{{ARGNAM}} is a {{symbol}}, {{string}}, or {{#f}}. Default is {{#f}}.
     299
    261300==== Usage
    262301
    263302<enscript language=scheme>
    264 (import type-checks-atoms)
    265 </enscript>
    266 
    267 ==== check-symbol
    268 
    269 <procedure>(check-symbol LOC OBJ [ARGNAM]) -> *</procedure>
    270 
    271 ==== check-keyword
    272 
    273 <procedure>(check-keyword LOC OBJ [ARGNAM]) -> *</procedure>
    274 
    275 ==== check-char
    276 
    277 <procedure>(check-char LOC OBJ [ARGNAM]) -> *</procedure>
    278 
    279 ==== check-boolean
    280 
    281 <procedure>(check-boolean LOC OBJ [ARGNAM]) -> *</procedure>
    282 
    283 
    284 === Type Errors
    285 
    286 ==== Argument Conventions
    287 
    288 {{TYPNAM}} is a {{symbol}} or {{string}}, unless otherwise indicated.
    289 
    290 {{ARGNAM}} is a {{symbol}}, {{string}}, or {{#f}}. Default is {{#f}}.
    291 
    292 ==== Usage
    293 
    294 <enscript language=scheme>
    295303(import type-errors)
    296304</enscript>
    297305
    298 ==== Usage
     306==== Type Errors Basic
     307
     308===== Usage
    299309
    300310<enscript language=scheme>
     
    302312</enscript>
    303313
    304 ==== make-bad-argument-message
     314===== make-bad-argument-message
    305315
    306316<procedure>(make-bad-argument-message [ARGNAM]) -> string</procedure>
     
    317327</enscript>
    318328
    319 ==== make-type-name-message
     329===== make-type-name-message
    320330
    321331<procedure>(make-type-name-message TYPNAM) -> string</procedure>
     
    331341</enscript>
    332342
    333 ==== make-error-type-message
     343===== make-error-type-message
    334344
    335345<procedure>(make-error-type-message TYPNAM [ARGNAM]) -> string</procedure>
     
    347357</enscript>
    348358
    349 ==== signal-bounds-error
     359===== signal-bounds-error
    350360
    351361<procedure>(signal-bounds-error LOC MSG OBJ...)</procedure>
     
    353363Raises a non-continuable type error - (({exn bounds)}}.
    354364
    355 ==== signal-type-error
     365===== signal-type-error
    356366
    357367<procedure>(signal-type-error LOC MSG OBJ...)</procedure>
     
    359369Raises a non-continuable type error - (({exn type)}}.
    360370
    361 ==== error-argument-type
     371===== error-argument-type
    362372
    363373<procedure>(error-argument-type LOC OBJ TYPNAM [ARGNAM])</procedure>
     
    368378Uses {{signal-type-error}} and {{make-error-type-message}}.
    369379
    370 ==== warning-argument-type
     380===== warning-argument-type
    371381
    372382<procedure>(warning-argument-type LOC OBJ TYPNAM [ARGNAM])</procedure>
     
    374384A warning is issued with a message similar to that of {{error-argument-type}}.
    375385
    376 ==== error-defined-value
     386===== error-defined-value
    377387
    378388<procedure>(error-defined-value LOC OBJ [ARGNAM])</procedure>
    379389
    380 ==== error-bound-value
     390===== error-bound-value
    381391
    382392<procedure>(error-bound-value LOC OBJ [ARGNAM])</procedure>
    383393
    384 ==== error-minimum-argument-count
     394===== error-minimum-argument-count
    385395
    386396<procedure>(error-minimum-argument-count LOC ARGC MINARGC)</procedure>
    387397
    388 ==== error-argument-count
     398===== error-argument-count
    389399
    390400<procedure>(error-argument-count LOC ARGC MAXARGC)</procedure>
    391401
    392 ==== define-error-type
     402===== define-error-type
    393403
    394404<macro>(define-error-type TYPNAM [TYPMSG])</macro>
     
    414424</enscript>
    415425
    416 ==== Usage
     426==== Type Errors Numbers
     427
     428===== Usage
    417429
    418430<enscript language=scheme>
     
    420432</enscript>
    421433
    422 ==== error-fixnum
    423 ==== error-positive-fixnum
    424 ==== error-natural-fixnum
    425 ==== error-negative-fixnum
    426 ==== error-non-positive-fixnum
     434===== error-fixnum
     435===== error-positive-fixnum
     436===== error-natural-fixnum
     437===== error-negative-fixnum
     438===== error-non-positive-fixnum
    427439
    428440<procedure>(error-fixnum LOC OBJ [ARGNAM])</procedure>
     
    432444<procedure>(error-non-positive-fixnum LOC OBJ [ARGNAM])</procedure>
    433445
    434 ==== error-integer
    435 ==== error-positive-integer
    436 ==== error-natural-integer
    437 ==== error-negative-integer
    438 ==== error-non-positive-integer
     446===== error-integer
     447===== error-positive-integer
     448===== error-natural-integer
     449===== error-negative-integer
     450===== error-non-positive-integer
    439451
    440452<procedure>(error-integer LOC OBJ [ARGNAM])</procedure>
     
    444456<procedure>(error-non-positive-integer LOC OBJ [ARGNAM])</procedure>
    445457
    446 ==== error-number
    447 ==== error-positive-number
    448 ==== error-natural-number
    449 ==== error-negative-number
    450 ==== error-non-positive-number
     458===== error-number
     459===== error-positive-number
     460===== error-natural-number
     461===== error-negative-number
     462===== error-non-positive-number
    451463
    452464<procedure>(error-number LOC OBJ [ARGNAM])</procedure>
     
    456468<procedure>(error-non-positive-number LOC OBJ [ARGNAM])</procedure>
    457469
    458 ==== error-flonum
     470===== error-flonum
    459471
    460472<procedure>(error-flonum LOC OBJ [ARGNAM])</procedure>
    461473
    462 ==== error-open-interval
     474===== error-open-interval
    463475
    464476<procedure>(error-open-interval LOC NUM MINNUM MAXNUM [ARGNAM])</procedure>
    465477
    466 ==== error-closed-interval
     478===== error-closed-interval
    467479
    468480<procedure>(error-closed-interval LOC NUM MINNUM MAXNUM [ARGNAM])</procedure>
    469481
    470 ==== error-half-open-interval
     482===== error-half-open-interval
    471483
    472484<procedure>(error-half-open-interval LOC NUM MINNUM MAXNUM [ARGNAM])</procedure>
    473485
    474 ==== error-half-closed-interval
     486===== error-half-closed-interval
    475487
    476488<procedure>(error-half-closed-interval LOC NUM MINNUM MAXNUM [ARGNAM])</procedure>
    477489
    478 ==== error-range
     490===== error-range
    479491
    480492<procedure>(error-range LOC START END [ARGNAM])</procedure>
    481493
    482 ==== error-interval
     494===== error-interval
    483495
    484496<procedure>(error-interval LOC NUM LEFT MINNUM MAXNUM RIGHT [ARGNAM])</procedure>
     
    490502symbolic closing of an interval.
    491503
    492 ==== Usage
     504==== Type Errors Structured
     505
     506===== Usage
    493507
    494508<enscript language=scheme>
     
    496510</enscript>
    497511
    498 ==== error-procedure
     512===== error-procedure
    499513
    500514<procedure>(error-procedure LOC OBJ [ARGNAM])</procedure>
    501515
    502 ==== error-input-port
     516===== error-input-port
    503517
    504518<procedure>(error-input-port LOC OBJ [ARGNAM])</procedure>
    505519
    506 ==== error-output-port
     520===== error-output-port
    507521
    508522<procedure>(error-output-port LOC OBJ [ARGNAM])</procedure>
    509523
    510 ==== error-list
     524===== error-list
    511525
    512526<procedure>(error-list LOC OBJ [ARGNAM])</procedure>
    513527
    514 ==== error-alist
     528===== error-alist
    515529
    516530<procedure>(error-alist LOC OBJ [ARGNAM])</procedure>
    517531
    518 ==== error-plist
     532===== error-plist
    519533
    520534<procedure>(error-plist LOC OBJ [ARGNAM])</procedure>
    521535
    522 ==== error-pair
     536===== error-pair
    523537
    524538<procedure>(error-pair LOC OBJ [ARGNAM])</procedure>
    525539
    526 ==== error-blob
     540===== error-blob
    527541
    528542<procedure>(error-blob LOC OBJ [ARGNAM])</procedure>
    529543
    530 ==== error-vector
     544===== error-vector
    531545
    532546<procedure>(error-vector LOC OBJ [ARGNAM])</procedure>
    533547
    534 ==== error-structure
     548===== error-structure
    535549
    536550<procedure>(error-structure LOC OBJ TAG [ARGNAM])</procedure>
     
    538552{{error-record}} and {{error-record-type}} are essentially synonyms.
    539553
    540 ==== error-string
     554===== error-string
    541555
    542556<procedure>(error-string LOC OBJ [ARGNAM])</procedure>
    543557
    544 ==== Usage
     558==== Type Errors Atoms
     559
     560===== Usage
    545561
    546562<enscript language=scheme>
     
    548564</enscript>
    549565
    550 ==== error-symbol
     566===== error-symbol
    551567
    552568<procedure>(error-symbol LOC OBJ [ARGNAM])</procedure>
    553569
    554 ==== error-keyword
     570===== error-keyword
    555571
    556572<procedure>(error-keyword LOC OBJ [ARGNAM])</procedure>
    557573
    558 ==== error-char
     574===== error-char
    559575
    560576<procedure>(error-char LOC OBJ [ARGNAM])</procedure>
    561577
    562 ==== error-boolean
     578===== error-boolean
    563579
    564580<procedure>(error-boolean LOC OBJ [ARGNAM])</procedure>
Note: See TracChangeset for help on using the changeset viewer.