maandag 29 maart 2021

Forth selfemit2":

  \  selfemit2":  FORTH  : code rewritten / adapted to run in WinForth 
  \  ( ugly as nice code 'goto NameFieldAddres' not quickly found in WinForth )

: selfemit2": here 4 + CREATE , DOES> @ swap 2* + dup @ emit 1+ @ emit ; 

 \  Example

selfemit2": MoTuWeThFrSaSu       \ Self emitting text

1 MoTuWeThFrSaSu   \ Emits Mo
2 MoTuWeThFrSaSu   \ Emits Tu
\ ..
7 MoTuWeThFrSaSu   \ Emits Su

   \ Also generic selfemit": can be made for use as
   \ 3 selfemit": MonTueWedThuFriSatSun
   \ 2 selfemit": MoTuWeThFrSaSu
   \
   \ or a complex flexible lenght that splits words at the capital in
   \  selfemitF": MondayTuesdayWednesdayThursdayFridaySaturdaySunday
   \
   \ For other Forth's or more/less characters BE CREATIVE 
   \ (Code does not work if complete defined string is not stored.
   \  I have seen Forth's that only store some characters and a checksum )
   \
   \          JanJeronimus   29MAR2021 

Geen opmerkingen: