亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? intro.htm

?? strongForth: a strongly typed dialect of Forth implemented in ANS Forth.
?? HTM
字號(hào):
<html>
<head>
<title>Introduction To StrongForth</title>
</head>
<body>
<h1>Introduction To StrongForth</h1>
<h2>Preface</h2>
<p>This introduction to StrongForth has been written for those
who already have collected some experience with Forth. 
Although StrongForth is as
close to ANS Forth as possible, it is not required that the
reader has worked with an ANS compliant Forth system.</p>
<p>The basic idea behind StrongForth is the wish to add strong
static type checking to a Forth system. Previous Forth systems
and standards (including ANS) were supposed to be <em>typeless</em>
or <em>untyped</em>, which means they do not do any type
checking at all. The interpreter and the compiler generally
accept any word to be applied to the operands on the data and
return stack. This behaviour grants total freedom to the
programmer, but on the other side it is rather often a reason for
type errors, which frequently cause system crashes and other more
or less strange behaviour throughout the whole development phase.</p>
<p>StrongForth does not guarantee bug-free programs. It does not
even grant the absence of crashes. But type errors will be
greatly reduced. Furthermore, since interpreter and compiler know
about the data types of the operands on the stack, they are able
to chose the appropriate version of a word, if the dictionary
contains several words with the same name, but different input
parameter types. This is called operator overloading. As will be
shown in this introduction, operator overloading allows a much
more comfortable way of programming. Additionally, it is no longer 
necessary for you to invent individual names for words with the 
same semantics, but different data types.</p>
<p>Of course, strong static typing has some drawbacks, which
might keep traditional Forth programmers from using it.
First, it requires a higher degree of discipline, because all
words having stack-effects have to be provided with precise stack
diagrams. Second, interpreter and compiler will prohibit not only
dirty tricks, but sometimes also just <em>unusual</em>
operations. For example, adding a flag to an address is not
possible, although it might be useful in some cases. And third,
relying on a system that does all the type-checking itself, might
lead to more careless programming.</p>
<p>Nevertheless, the advantages and disadvantages of strong
static type checking have already been discussed in the Forth
community. The availability of StrongForth will certainly put
more practical aspects into the previously rather theoretical
discussion, allowing you to simply try it out by yourself.</p>
<h2>First Steps</h2>
<p>Let's begin with a few examples out of the first chapter of
Leo Brodie's famous textbook <em>Starting Forth</em>:</p>
<pre><u>15 SPACES</u>                 OK</pre>
<p>When interpreting the number <kbd>15</kbd>, the interpreter pushes this
value on the data stack and remembers that it is an unsigned
single integer. <kbd>SPACES</kbd> is a word that requires an unsigned single
integer as input parameter. Here's a possible definition of 
<kbd>SPACES</kbd>:</p>
<pre>: SPACES ( UNSIGNED -- )
  0 ?DO SPACE LOOP ;</pre>
<p>Well, this is not very exciting. At a first look, the only
more or less interesting thing about it is the stack diagram.
Standard Forth systems use <kbd>( n -- )</kbd>, which is nothing but a
comment. In StrongForth, it is interpreted source code, which
compiles the stack diagram of <kbd>SPACES</kbd> into the dictionary.
Additionally, it tells the compiler, that the definition starts
with an item of data type <kbd>UNSIGNED</kbd> on the data stack, and is
expected to remove this item on exiting. Generally, each word in
the dictionary includes full information about its stack effect.</p>
<p>So let us now try a second example:</p>
<pre><u>42 EMIT</u> * OK</pre>
<p><kbd>EMIT</kbd> is a word that expects a number on the stack and 
displays the ASCII character associated with this number. We can also 
write</p>
<pre><u>CHAR * EMIT</u> * OK</pre>
<p>instead, because a character is some kind of a number. Even 
the following code works well:</p>
<pre><u>CHAR * .</u> * OK</pre>
<p>But wait ... Isn't <kbd>.</kbd> supposed to display a number, and not 
a character? Let's see:</p>
<pre><u>42 .</u> 42  OK</pre>
<p>Yes, this still works. But how does <kbd>.</kbd> know whether it should print 
a number or an ASCII character? StrongForth actually provides more than 
one version of <kbd>.</kbd>. There's one version for displaying numbers, 
and there's one version for displaying characters. The interpreter and 
the compiler take care of selecting the version that is suited best for the 
purpose. In this case, a number is displayed as a number, and a 
character is displayed as a character. When we write <kbd>42</kbd>, the 
interpreter pushes 42 onto the data stack and keeps in mind that this 
is a number. When we write <kbd>CHAR *</kbd>, the interpreter pushes 
exactly the same value onto the stack, but this time it makes a note that 
the item on top of the stack is a character. This note later allows the 
interpreter to select the correct version of <kbd>.</kbd>. <kbd>EMIT</kbd> 
doesn't make this difference. It displays each and every parameter as an 
ASCII character.</p>
<p>There are several other versions of <kbd>.</kbd> in
StrongForth's dictionary. Just have a look at these:</p>
<pre><u>3 4 = .</u> FALSE  OK
<u>-16 .</u> -16  OK</pre>
<p>In this example, <kbd>=</kbd> takes the two items of data type 
<kbd>UNSIGNED</kbd> and returns an item of data type <kbd>FLAG</kbd>. 
A special version of <kbd>.</kbd> for flags delivers the appropriate 
result. The second example seems to be straight-forward, but it is not.
Remember that <kbd>15</kbd>, <kbd>42</kbd>, <kbd>3</kbd> and <kbd>4</kbd> 
produced items of data type <kbd>UNSIGNED</kbd>. <kbd>-16</kbd> produces 
an item of data type <kbd>SIGNED</kbd>, and the
interpreter finds a version of <kbd>.</kbd> suited for signed
numbers. To enter a positive signed number, you have to precede
it with a sign, for example <kbd>+16</kbd>. The advantage of distinguishing
between signed and unsigned numeric literals becomes obvious when
we try larger numbers:</p>
<pre><u>4000000000 .</u> 4000000000  OK
<u>+4000000000 .</u> -294967296  OK</pre>
<p>A standard 32-bit Forth system would always display <kbd>-294967296</kbd>,
because it can not distinguish signed and unsigned numbers. You'd have to 
explicitly use <kbd>U.</kbd> in order to display 4000000000 as 
an unsigned number.</p>
<p>With the knowledge obtained so far, let's try out the compiler,
still sticking to the examples in Leo Brodie's <em>Starting Forth</em>:</p>
<pre><u>: STAR [CHAR] * . ;</u>  OK
<u>STAR</u> * OK
<u>CR</u>
 OK
<u>CR STAR CR STAR CR STAR</u>
*
*
* OK
<u>: STARS 0 DO STAR LOOP ;</u>
: STARS 0 DO ? undefined word
UNSIGNED
  OK</pre>
<p>Oops. What's that? <kbd>DO</kbd> tried to compile its runtime semantics, 
which expects two numbers of the same data type on the stack, but there was
only one. Thus, the compiler could not find an appropriate
runtime word <kbd>DO</kbd> in the dictionary, and throws an exception.
Yes, we have to supply a stack diagram to <kbd>STARS</kbd>:</p>
<pre><u>: STARS ( UNSIGNED -- ) 0 DO STAR LOOP ;</u>  OK
5 STARS ***** OK
<u>STARS</u>
STARS ? undefined word
</pre>
<p>So, the compiler starts with an <kbd>UNSIGNED</kbd> on the stack, adds
another one (<kbd>0</kbd>), and now <kbd>DO</kbd>'s runtime word gets its 
input parameters. The last line just shows that <kbd>STARS</kbd> will 
not be found in the dictionary, if the stack is empty.</p>
<p>Finally, let's complete Leo Brodie's example:</p>
<pre><u>: MARGIN CR 30 SPACES ;</u>  OK
<u>: BLIP MARGIN STAR ;</u>  OK
<u>: BAR MARGIN 5 STARS ;</u>  OK
<u>: F BAR BLIP BAR BLIP BLIP CR ;</u>  OK
<u>F</u>
                              *****
                              *
                              *****
                              *
                              *
 OK</pre>
<h2>Data Types</h2>
<p>In the previous section, we have introduced four data types:
<kbd>UNSIGNED</kbd>, <kbd>SIGNED</kbd>, <kbd>CHARACTER</kbd>, and 
<kbd>FLAG</kbd>. Actually, StrongForth knows 
a lot more data types, and it is even possible to define new,
application-specific data types.</p>
<h3>Data Type Structure</h3>
<p>Having several different data types is certainly useful, but a
large, unstructured quantity of data types would cause a serious
problem. Since it should be possible to apply words like <kbd>DUP</kbd> and
<kbd>DROP</kbd> to almost every data type, it would be necessary to 
supply a separate version of these words for each of them. Words with
two input parameters, like <kbd>SWAP</kbd>, would have to be defined for
each possible combination of data types, which makes already 1024
versions for 32 data types! <kbd>ROT</kbd> would be even worse.</p>
<p>To solve this problem, StrongForth arranges all data types in
a hierarchical structure. There are four data types at the root of
this hierarchy: <kbd>SINGLE</kbd>. <kbd>DOUBLE</kbd>, <kbd>TUPLE</kbd>, 
and <kbd>SYS</kbd>. All other data types are direct of indirect subtypes 
of these four so-called <em>anchestor</em> data types. The complete
data type structure looks like this:</p>

<pre>SINGLE
|
+-- INTEGER
|   |
|   +-- UNSIGNED
|   |
|   +-- SIGNED
|   |
|   +-- CHARACTER
|
+-- ADDRESS
|   |
|   +-- CADDRESS
|
+-- LOGICAL
|   |
|   +-- FLAG
|
+-- DEFINITION
|
+-- TOKEN
|   |
|   +-- SEARCH-CRITERION
|
+-- FILE
|
+-- FAM
|
+-- WID
|
+-- R-SIZE
|
+-- CONTROL-FLOW

DOUBLE
|
+-- INTEGER-DOUBLE
|   |
|   +-- UNSIGNED-DOUBLE
|   |	|
|   |	+-- NUMBER-DOUBLE
|   |
|   +-- SIGNED-DOUBLE
|
+-- DATA-TYPE
    |
    +-- STACK-DIAGRAM

TUPLE
|
+-- INPUT-SOURCE

SYS
|
+-- ORIG/DEST
|   |
|   +-- ORIG
|   |
|   +-- DEST
|
+-- COLON-SYS
|   |
|   +-- DOES-SYS
|
+-- DO-SYS
|
+-- CASE-SYS
|
+-- OF-SYS</pre>

<p>Whenever the interpreter or compiler tries to find a word in
the dictionary, it accepts not only a word whose input parameters
match the data types of the items on the stack <em>exactly</em>,
but also a word whose input parameters are parents of those. Thus,
only two versions of <kbd>DUP</kbd> and <kbd>DROP</kbd> are required 
for data types <kbd>SINGLE</kbd> and <kbd>DOUBLE</kbd> and all their 
respective subtypes. If, for example, the item on top of the data 
stack has data type <kbd>UNSIGNED</kbd>, the version of 
<kbd>DUP</kbd> for data type <kbd>SINGLE</kbd> would match, because
<kbd>UNSIGNED</kbd> is a (second-generation) subtype of <kbd>SINGLE</kbd>. 
Similarly, four versions of <kbd>SWAP</kbd> and eight versions of 
<kbd>ROT</kbd> (instead of 22

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本韩国一区二区三区视频| 色94色欧美sute亚洲线路二 | 婷婷久久综合九色综合伊人色| 欧美日韩高清不卡| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 国产精品一卡二| 亚洲国产你懂的| 国产三级精品视频| 91精品国产综合久久福利软件| 成人黄色免费短视频| 麻豆精品一二三| 亚洲综合免费观看高清完整版在线| 欧美精品一区二区在线播放 | 7777精品伊人久久久大香线蕉经典版下载 | 国产欧美一区二区精品仙草咪| 欧美日本国产视频| 91麻豆精品秘密| 国产mv日韩mv欧美| 国精产品一区一区三区mba视频 | 亚洲国产成人私人影院tom | 精品久久久久久最新网址| 色一情一乱一乱一91av| 国产69精品久久99不卡| 国产一区二区三区在线观看免费| 亚洲1区2区3区4区| 亚洲激情一二三区| 中文字幕亚洲成人| 亚洲国产精品精华液2区45| 亚洲精品在线网站| 91精品啪在线观看国产60岁| 欧美午夜电影一区| 在线看国产日韩| 色女孩综合影院| 99麻豆久久久国产精品免费| 国产福利91精品一区| 激情另类小说区图片区视频区| 丝袜诱惑亚洲看片 | 国产精品一区二区视频| 久久精品国产精品亚洲红杏| 日本午夜一区二区| 日本强好片久久久久久aaa| 日本午夜一本久久久综合| 日韩成人精品在线观看| 丝袜美腿成人在线| 天堂久久久久va久久久久| 午夜精品一区在线观看| 日日摸夜夜添夜夜添精品视频| 午夜久久电影网| 日韩avvvv在线播放| 日本欧美一区二区| 国产自产v一区二区三区c| 国产激情一区二区三区| 国产99精品视频| 91美女片黄在线观看91美女| 色吊一区二区三区| 欧美精品成人一区二区三区四区| 欧美日本在线播放| 精品毛片乱码1区2区3区| 国产亚洲欧美日韩在线一区| 亚洲国产高清在线观看视频| 1区2区3区国产精品| 亚洲高清免费在线| 日本大胆欧美人术艺术动态| 久久精品99久久久| 粉嫩av亚洲一区二区图片| 色婷婷国产精品久久包臀| 欧美日韩日日夜夜| 精品国产乱码久久久久久图片| 国产目拍亚洲精品99久久精品| 国产精品国产三级国产普通话三级| 亚洲精品自拍动漫在线| 欧美aaa在线| 不卡一卡二卡三乱码免费网站| 在线精品国精品国产尤物884a| 在线不卡一区二区| 国产午夜亚洲精品午夜鲁丝片| 国产精品国产三级国产aⅴ无密码| 亚洲欧美日韩国产综合| 日韩精品一区第一页| 国产美女娇喘av呻吟久久| 91丨国产丨九色丨pron| 在线电影欧美成精品| 久久久久青草大香线综合精品| 亚洲乱码国产乱码精品精的特点| 日韩国产精品久久久| 国产精品自拍一区| 欧美在线免费观看视频| 精品国产91乱码一区二区三区| 中文字幕一区在线| 日本不卡在线视频| 99久久精品免费观看| 日韩一区二区三区电影在线观看| 国产婷婷色一区二区三区| 亚洲国产日韩a在线播放性色| 久久99精品久久久久婷婷| 91影视在线播放| 日韩欧美的一区| 亚洲另类在线制服丝袜| 麻豆精品视频在线观看免费| 成人在线视频一区| 日韩一级大片在线观看| 最新国产成人在线观看| 久久成人综合网| 在线中文字幕一区二区| 国产色一区二区| 日韩精品视频网| 91色视频在线| 欧美高清在线精品一区| 国内精品免费**视频| 欧美日韩久久久一区| 国产精品家庭影院| 国产一区二区在线看| 欧美男男青年gay1069videost | 欧美私模裸体表演在线观看| 国产精品视频一二三| 免费人成网站在线观看欧美高清| 色屁屁一区二区| 国产精品久久久久影院老司| 国产乱对白刺激视频不卡| 欧美乱熟臀69xxxxxx| 亚洲黄色免费网站| 成+人+亚洲+综合天堂| 国产欧美一区二区在线| 久久精品国产在热久久| 日韩欧美国产电影| 婷婷中文字幕一区三区| 欧美三电影在线| 曰韩精品一区二区| 91色porny蝌蚪| 综合欧美亚洲日本| www.亚洲激情.com| 国产蜜臀97一区二区三区| 国产高清视频一区| 久久久国产精华| 国产一区二区三区四| 2024国产精品视频| 国产主播一区二区| 久久蜜臀精品av| 国产成人精品一区二区三区网站观看| 欧美精品一区二区高清在线观看| 日本aⅴ免费视频一区二区三区| 777午夜精品视频在线播放| 亚洲高清免费在线| 欧美日韩高清一区二区不卡| 天堂在线亚洲视频| 日韩午夜激情av| 蜜臀va亚洲va欧美va天堂| 日韩三级高清在线| 国产一区欧美一区| 久久久国产精品午夜一区ai换脸| 懂色av噜噜一区二区三区av| |精品福利一区二区三区| 97国产一区二区| 亚洲一卡二卡三卡四卡| 在线电影国产精品| 韩国成人精品a∨在线观看| 国产婷婷色一区二区三区在线| 成人福利视频在线看| 亚洲三级免费电影| 欧美高清www午色夜在线视频| 日本三级韩国三级欧美三级| 精品久久久久久久久久久久久久久久久 | 91福利国产成人精品照片| 亚洲午夜三级在线| 日韩片之四级片| 精品一区二区三区不卡 | 色成人在线视频| 天天av天天翘天天综合网| 日韩欧美国产wwwww| 国产成人免费视频网站高清观看视频 | 国产日韩欧美a| 91日韩在线专区| 日韩va亚洲va欧美va久久| 久久精品亚洲国产奇米99| 99精品视频在线观看免费| 午夜不卡av免费| 久久久综合视频| 91香蕉视频mp4| 天天色天天爱天天射综合| 久久综合网色—综合色88| www.日韩精品| 免费人成精品欧美精品| 最新国产精品久久精品| 欧美一区二区三区公司| 成人免费视频免费观看| 亚洲影视资源网| 国产女主播一区| 91精品欧美久久久久久动漫| 国产成人啪免费观看软件| 丝袜a∨在线一区二区三区不卡| 国产欧美va欧美不卡在线| 欧美猛男男办公室激情| 成人小视频在线| 美女脱光内衣内裤视频久久影院| 国产精品久久网站| 日韩一区二区三区视频| 欧美亚洲综合网| 国产福利91精品一区二区三区| 亚洲成va人在线观看| 国产精品美女久久久久久久久|