[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gforth] Classic or smart .S ?

From: Anton Ertl
Subject: [gforth] Classic or smart .S ?
Date: Tue, 30 Apr 2019 17:12:34 +0200
User-agent: NeoMutt/20170113 (1.7.2)

In Gforth the classic .S produces just numbers in the current base,

<7> 140403976810720 0 140403977391576 140403977391576 0 11192792 140403976810872

Gforth also supports a smart .S that uses heuristics to determine what
kind of data is on the stack and displays it appropriately; the same
stack data displayed with the smart .S shows:

<7> `noop 0 `fuenf `fuenf 0 $81F9D8 `execute

where `<word> means the execution token of <word>.  Addresses are
shown in hex with a "$" prefix.  The smart .S currently also shows

s" abcdefghijk" 3 /string .s \ outputs: <2> "defghijk"  ok 2

Up to a few days ago you got the classic .S if you typed ".S".  To get
the smart .S, you had to type "...".

With the current git head, you get the smart .S when you type ".S".
To get the classic .S, you have to say

' . is .s.

After doing that, the last stack shown above is shown as

<2> 21765267 8

What do you think should be the default for .S and ~~: the classic or
the smart .S ?

- anton

reply via email to

[Prev in Thread] Current Thread [Next in Thread]