Re: [Flashforth-devel] n=
Brought to you by:
oh2aun
From: Mikael N. <mik...@fl...> - 2021-08-01 19:03:54
|
Hi, Check n= in the linked document. https://flashforth.com/wordsAll.txt Strings can only be defined in flash with ." and S" within an word definition. With ," you can append a string to the current memory space outside a word definition You can copy a string from flash to a ram buffer with PLACE. : s1 s" hello" ; ram create str-buf 20 allot s1 str-buf place str-buf 1+ s1 n= Something like that should work. Or something like this ram here ," hello" 1+ s1 n= Note that repeated use of ," will use up memory. BR Mikael With ," On 2021-08-01 17:29, BK Navarette wrote: > I'm trying to use n= to compare strings for a menu system. The results > are ambiguous. How do you put a string in ram? I tried ram : test ." > test string" ; and ram : test2 s" test string" ; both seemed to end in > flash because after a reset/power cycle they were still in the > dictionary. I'm not understanding how n= works. > > thanks > > Brian-in-ohio > > > > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel -- -- Mikael |