Merge branch 'master' of git://factorcode.org/git/factor
commit
ab1d9db6ad
|
@ -20,7 +20,7 @@ SET-NTH [ T dup c-setter array-accessor ]
|
||||||
WHERE
|
WHERE
|
||||||
|
|
||||||
TUPLE: A
|
TUPLE: A
|
||||||
{ underlying alien read-only }
|
{ underlying c-ptr read-only }
|
||||||
{ length fixnum read-only } ;
|
{ length fixnum read-only } ;
|
||||||
|
|
||||||
: <A> ( alien len -- direct-array ) A boa ; inline
|
: <A> ( alien len -- direct-array ) A boa ; inline
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
|
||||||
|
USING: kernel lexer parser words quotations compiler.units ;
|
||||||
|
|
||||||
|
IN: sto
|
||||||
|
|
||||||
|
! Use 'sto' to bind a value on the stack to a word.
|
||||||
|
!
|
||||||
|
! Example:
|
||||||
|
!
|
||||||
|
! 10 sto A
|
||||||
|
|
||||||
|
: sto
|
||||||
|
\ 1quotation parsed
|
||||||
|
scan
|
||||||
|
current-vocab create
|
||||||
|
dup set-word
|
||||||
|
literalize parsed
|
||||||
|
\ swap parsed
|
||||||
|
[ define ] parsed
|
||||||
|
\ with-compilation-unit parsed ; parsing
|
Loading…
Reference in New Issue