Merge branch 'master' of git://factorcode.org/git/factor

db4
Doug Coleman 2008-12-04 13:55:55 -06:00
commit ab1d9db6ad
2 changed files with 21 additions and 1 deletions

View File

@ -20,7 +20,7 @@ SET-NTH [ T dup c-setter array-accessor ]
WHERE
TUPLE: A
{ underlying alien read-only }
{ underlying c-ptr read-only }
{ length fixnum read-only } ;
: <A> ( alien len -- direct-array ) A boa ; inline

20
extra/sto/sto.factor Normal file
View File

@ -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