F#基础教程 关键字

  大多数程序语言都有自己的关键字。关键字是语言的令牌,由编译器的功能而定。在F#中,不能使用关键字作为标识符的名称或类型的名称。以下是F#的关键字:

abstract     lsl
and         lsr
as           lxor
assert        match member
asr         mod
begin       module
class       mutable namespace
default      new
delegate        null
do        of
done         open
downcast      or
downto     override
else       rec
end       sig
exception    static
false       struct
finally      then
for       to
fun       true
function     try
if        type
in        val
inherit      when
inline       upcast
interface     while
land       with
lor

    下面列出的是目前F#中没有的关键字,但都被保留可能将来使用,现在使用它将发出编译器警告。如果你关心代码在未来的兼容性,最好避免使用他们。

async       method
atomic          mixin
break            namespace
checked        object
component     process
const             property
constraint      protected
constructor     public
continue          pure
decimal           readonly
eager             return
enum             sealed
event             switch
external         virtual
fixed          void
functor          volatile
include          where

 

  

posted @ 2011-11-21 16:16  银河系漫游指南  阅读(557)  评论(0编辑  收藏  举报