how to use literal?

Ethan Gardener <[email protected]>
Newsgroups gmane.comp.lang.forth.gforth
Message-ID <1536915287.3338541.1507819392.30EA17EB@webmail.messagingengine.com>
i thought literal's compilation semantics are to take a number from the stack and compile it into the definition so it's pushed at run-time.  i'm getting errors when i try to use it that way.  there are 2 simple examples below.  (i know i could have used 2constant instead of these definitions, i had just woken up.  anyway, these are simple repeatable examples.)  

these are from 0.7.0.  i get much the same errors on my phone with gforth 0.7.9_20180905.  the first describes the error as "Control structure mismatch" and references glocals.fs:625:5 .  there's no intentional involvement with local variables here at all.  the second references unix/libc.fs:107:44 .


C:\gforth>gforth eekee.fs
Gforth 0.7.0, Copyright (C) 1995-2008 Free Software Foundation, Inc.
Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
Type `bye' to exit
here 1024 allot : mypad literal 1024 ;
:1: unstructured
here 1024 allot : mypad literal 1024 >>>;<<<
Backtrace:
$7EBA2B0C throw
$7EBAB804 c(abort")
$7EBB2DD8 def?
$7EBA79D0 ;-hook


C:\gforth>gforth eekee.fs
Gforth 0.7.0, Copyright (C) 1995-2008 Free Software Foundation, Inc.
Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
Type `bye' to exit
: mypad [ here 1024 allot ] literal 1024 ;  ok
mypad .s
:2: Invalid memory address
>>>mypad<<< .s
Backtrace:
$7EBA4F38 execute
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.