User Tools

Site Tools


en:pfw:library

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:pfw:library [2025-02-06 14:42] – [Structure] willemen:pfw:library [2025-02-06 17:59] (current) – [A library for Forth] willem
Line 1: Line 1:
 ====== A library for Forth ====== ====== A library for Forth ======
 +
 +*W.O.*
  
  
Line 66: Line 68:
 They act as separators and are not part of the text itself. They act as separators and are not part of the text itself.
  
-The ''%%09%%'' marks the end or beginning of a chapter, like this:\\ +The ''%%09%%'' marks the end of a chapter, like this:\\ 
-Note that: The library starts with a dummy ''%%09%%'' so that the first keyword line can be found.\\ + 
-  * ''%%09%%'' chapter-1 ''%%09%%'' chapter-2 ''%%09%%'' last-chapter ''%%09%%''+  * chapter-1 ''%%09%%'' chapter-2 ''%%09%%'' last-chapter ''%%09%%''
  
 The ''%%0D%%'' marks the end of a line:\\ The ''%%0D%%'' marks the end of a line:\\
   * line-1 ''%%0D%%'' line-2 ''%%0D%%'' last-line ''%%0D%%''   * line-1 ''%%0D%%'' line-2 ''%%0D%%'' last-line ''%%0D%%''
  
-The first line of each library chapter starts with case insensitive keyword(s) separated by spaces. The word ''%%CHAPTER%%'' builds this the first line, and provides this line with a+The first line of each library chapter starts with case insensitive keyword. The word ''%%CHAPTER%%'' builds this the first line, and provides this line with a
 backslash to prevent the keywords for being executed while loading a chapter. Then it adds all source code until the ''<nowiki>%%</nowiki>'' marker is found. The end of each chapter is marked by ''%%09%%'' backslash to prevent the keywords for being executed while loading a chapter. Then it adds all source code until the ''<nowiki>%%</nowiki>'' marker is found. The end of each chapter is marked by ''%%09%%''
 The end of the library is kept in a pointer that is updated when we extend the library.\\ The end of the library is kept in a pointer that is updated when we extend the library.\\
Line 426: Line 428:
 ==== A little extra ==== ==== A little extra ====
  
-Loading a lot of library code in one go. it is used like this: ''%%need( -rot -2rot d- asm\ )%%''\\+Loading a lot of library code in one go. It must be used like this: ''%%need( -rot -2rot d- asm\ )%%''\\
 Note that ''%%BL-WORD%%'' is a typical noForth word that uses ''%%REFILL%%'' inside, so it can load multiple lines of library words when you need too. Note that ''%%BL-WORD%%'' is a typical noForth word that uses ''%%REFILL%%'' inside, so it can load multiple lines of library words when you need too.
  
en/pfw/library.1738849331.txt.gz · Last modified: 2025-02-06 14:42 by willem