27
Only supports fixnum, and its range is varied by the user-selected
28
underlying storage implementation. The range can be known via SRFI-77
29
compatible `(least-fixnum)` and `(greatest-fixnum)`.
25
Current implementation only supports fixnum, and its range varies by the
26
user-selected underlying storage implementation. The range can be known via
27
R6RS (R5.91RS) compatible `(fixnum-width)`, `(least-fixnum)` and
52
The hygienic macros are fully supported.
53
The hygienic macros are fully supported. But although the macro expansion
54
engine itself works well and can be expected as R5RS-conformant, its
55
integration into SigScheme is not fully validated yet. It is likely having a
56
problem on identifier references.
57
Only integer part is implemented.
61
SigScheme supports only the integer part of the numerical tower.
66
SigScheme recognizes only these limited part of numerical forms of "7.1.1
67
Lexical structure" section of R5RS. Other valid R5RS forms for numbers produce
70
----------------------------------------------------------------
71
<number> --> <num 2>| <num 8>
74
<num R> --> <prefix R> <complex R>
75
<complex R> --> <real R>
76
<real R> --> <sign> <ureal R>
77
<ureal R> --> <uinteger R>
78
<uinteger R> --> <digit R>+ #* ;; '#' must not occur
79
<prefix R> --> <radix R>
81
<sign> --> <empty> | + | -
84
<radix 10> --> <empty> | #d
87
<digit 8> --> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7
88
<digit 10> --> <digit>
89
<digit 16> --> <digit 10> | a | b | c | d | e | f
90
<digit> --> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
91
----------------------------------------------------------------
93
SigScheme accepts only lower case alphabets as radices as follows. But
94
hexadecimal digits can be written as either lower or upper.
96
----------------------------------------------------------------
102
----------------------------------------------------------------
104
SigScheme uses a fixed-size buffer for number literals parsing. Due to the
105
implementation, it can accept only one optional '0' prefix for maximum-length
106
binary number literals. Two or more '0' prefixes causes an error as follows.
108
----------------------------------------------------------------
109
;; storage-compact on ILP32 env
111
(greatest-fixnum) ==> 2147483647
112
#b11111111000000001111111100000000 ==> 4278255360
113
#b011111111000000001111111100000000 ==> 4278255360
114
#b0011111111000000001111111100000000 ==> error
115
#b00011111111000000001111111100000000 ==> error
116
----------------------------------------------------------------
121
The procedures '-' and '/' support following optional form.
123
----------------------------------------------------------------
124
6.2.5 Numerical operations
126
optional procedure: - z1 z2 ...
127
optional procedure: / z1 z2 ...
128
----------------------------------------------------------------
62
134
All character category-sensitive procedures and predicates (such as
63
char-upcase) work correctly only in ASCII range. i.e. Neigher Unicode
135
char-upcase) work correctly only in ASCII range. i.e. Neither Unicode
64
136
processing specified in SRFI-75 nor other non-Unicode multibyte character
65
137
processing are supported in such procedures/predicates.
245
317
.SCM_STRICT_ARGCHECK enabled
246
318
================================================================
247
319
sscm> (car '(1 2) 3 4)
248
ERROR: in (function call): superfluous argument(s): (3 4)
320
Error: in (function call): superfluous argument(s): (3 4)
249
321
sscm> (symbol? 'foo . #t)
250
ERROR: in (function call): improper argument list terminator: #t
322
Error: in (function call): improper argument list terminator: #t
251
323
sscm> (+ 3 4 . 5)
252
ERROR: in (reduction): improper argument list terminator: 5
324
Error: in (reduction): improper argument list terminator: 5
253
325
================================================================
255
327
.SCM_STRICT_ARGCHECK disabled
320
398
Although a C implementation `module-srfi1.c` is existing, it is still broken
321
399
and should not use for production codes. To get SRFI-1 working with SigScheme,
322
use SLIB version of the library (will made available after some preparations).
400
use SLIB version of the library (will be made available after some
404
SRFI-22 Running Scheme Scripts on Unix
405
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
407
SigScheme only supports the prelude line interpretation. All options written in
408
the line are applied as same as commandline invocation of sscm. But the `main`
409
procedure invocation is not supported (yet).
411
.Prelude line is interpreted as follows
412
================================================================
413
#! /usr/bin/env sscm -C UTF-8
416
==> Character encoding for the file is changed to UTF-8 temporarily.
417
================================================================
325
420
SRFI-23 Error Reporting Mechanism
326
421
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
328
The `error` procedure throws a SigScheme-specific error object in cooperate
329
with "SRFI-34 Exception Handling for Programs". Since the error objects are
330
represented as a list, be careful on catching an exception based on its type.
331
If you want to distinguish the error objects from ordinary lists, use
332
SigScheme-specific `%%error-object?` predicate.
423
If srfi-34 is provided, the `error` procedure throws a SigScheme-specific error
424
object in cooperate with "SRFI-34 Exception Handling for Programs". Otherwise
425
it simply calls scm_fatal_error(). Since the error objects are represented as a
426
list, be careful on catching an exception based on its type. If you want to
427
distinguish the error objects from ordinary lists, use SigScheme-specific
428
`%%error-object?` predicate.
334
430
.Error objects are also caught as a list
335
431
================================================================
353
449
================================================================
451
SRFI-28 Basic Format Strings
452
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
454
SigScheme fully supports SRFI-28. A directive-less tilde at end of a format
455
string causes an error as same as the reference implementation of SRFI-28.
458
================================================================
459
(format "~") ==> error
460
(format "a~") ==> error
461
================================================================
355
463
SRFI-38 External Representation for Data with Shared Structure
356
464
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
358
466
Only `write-with-shared-structure` is implemented and
359
467
`read-with-shared-structure` is not. The optional alias `write/ss` described in
360
SRFI-38 is also defined.
468
SRFI-38 is also defined. The optional `optarg` argument is simply ignored.
362
470
The shared index starts with #1 (not #0).
374
482
SRFI-48 Intermediate Format Strings
375
483
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
485
SigScheme fully supports SRFI-48.
377
487
The 'd' part of '~w,dF' directive is acceptable, but completely ignored on
378
488
output format. Since SigScheme only supports integer currently, number is
379
489
always formatted as integer even if the 'd' part is specified.
382
================================================================
383
(format "~3F" 3) => " 3"
384
(format "~3,2F" 3) => "3.00"
385
================================================================
388
================================================================
389
(format "~3F" 3) => " 3"
390
(format "~3,2F" 3) => " 3"
391
================================================================
492
================================================================
493
(format "~3F" 3) ==> " 3"
494
(format "~3,2F" 3) ==> "3.00"
495
================================================================
498
================================================================
499
(format "~3F" 3) ==> " 3"
500
(format "~3,2F" 3) ==> " 3"
501
================================================================
503
Although the reference implementation of SRFI-48 allows directive-less tilde at
504
end of a format string, SigScheme rejects it as an error since it decreases
505
user-code portability, and is confusable due to that the behavior is different
506
to the reference implementation of SRFI-28.
508
.Reference implementation of SRFI-48
509
================================================================
511
(format "a~") ==> "a~"
512
================================================================
515
================================================================
516
(format "~") ==> error
517
(format "a~") ==> error
518
================================================================
393
521
SRFI-60 Integer as Bits
394
522
~~~~~~~~~~~~~~~~~~~~~~~
440
568
SRFI-75 R6RS Unicode data
441
569
~~~~~~~~~~~~~~~~~~~~~~~~~
443
- quoted-symbol by vertical bar (|) is not supported yet
571
SRFI-75 is partially implemented. But since SRFI-75 had already been obsoleted,
572
it is not validated deeply. It will be replaced with stable R6RS implementation
573
once the specifications have been stabilized
575
Current SRFI-75 status
576
^^^^^^^^^^^^^^^^^^^^^^
578
- Supports Unicode character literals such as #\λ
579
- Supports #xXX, #\uXXXX and #\UXXXXXXXX literals
580
- Supports Unicode identifiers (lacks character category validation)
581
- Supports all named chars such as #\backspace, #\esc, and #\nul
582
- Quoted-symbol by vertical bar (such as '|-symbol|) is not supported
587
- Remove #\uXXXX and #\UXXXXXXXX literals
588
- Support variable-length #\xXX literal
589
- Support character category validation for identifiers
590
- Disable #\newline on R6RS-compatible mode
591
- Confirm symbol escape syntax (not defined in R6RS yet)
448
594
SIOD compatibility
449
595
------------------
597
FIXME: describe them.
453
601
- let and let* bindings