Moontalk server and client (provided by many parties)
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

23 lignes
640B

  1. \ An extended string is essentially the same
  2. \ as a counted string, with the only difference that
  3. \ instead of storing max 1 char length of a string,
  4. \ we can store up to cell sized strings.
  5. \ Copy an extended string to
  6. : xplace ( c-addr u a-addr -- )
  7. swap dup >r over ! ( c-addr a-addr )
  8. cell + r> move ;
  9. : xcount ( a-addr -- c-addr u )
  10. dup cell + swap @ ;
  11. : +xplace ( c-addr u a-addr -- )
  12. 2dup >r >r xcount ( c-addr u c-addr u )
  13. + swap ( c-addr a-addr u )
  14. move ( -- )
  15. r> r> +! ;
  16. \ single char
  17. create somechar 1 chars allot align
  18. : +xplace-char ( n a-addr -- )
  19. swap somechar c! somechar 1 rot +xplace ;