2010-02-28 142 views
1

下面的文檔是針對一個模塊,它現在已被「退役」 ,我正在寫它的替代品。 在我寫替換之前,我想讓我的條款正確。 我知道這些條款在文檔中是錯誤的 - 它被快速入侵了,所以我可以指示一個大學在這個項目的硬件方面工作,如何使用我製作的程序。 對於任何有興趣的人來說,可以找到完整的紀錄片(大部分內容已被寫入並加入到我們的wiki中),但該網站可能僅適用於某些IPS(取決於您的ISP) - 大學的互聯網連接最有可能工作),而SVN回購是私人的。文檔的正確術語

所以有很多術語是錯誤的。 等。
deliminators
含值表達式(現在可能是錯誤的,但很難說)

什麼是這些正確的術語格式化字符串。 什麼其他錯誤,因爲我已

 


    ==== formatted string containing value expressions ==== 
    Before I start on actual programs an explanation of: 
    "formatted string containing value expressions" and how to encode values in them. 

    The ''formatted string containing value expressions'' is at the core of doing low level transmission. 
    We know the decimal 65, hex 41, binary 0100 0001, and the ascii character 'A' all have the same binary representation, so to tell which we are using we have a series of deliminators - numbers preceded by: 
    # are decimal 
    $ are Hex 
    @ are binary 
    No deliminator, then ascii. 

    Putting a sign indicator after the deliminator is optional. It is required if you want to send a negative number. 

    You may put muliple values in the same string. 
    eg: "a#[email protected]$-0F" 

    All values in a ''formatted string containing value expressions'' must be in the range -128 to 255 (inclusive) as they must fit in 8bytes (other values will cause an error). Negative numbers have the compliment of 2 representation for their binary form. 

    There are some problems with ascii - characters that can't be sent (in future versions this will be fixed by giving ascii a delineator and some more code to make that deliminator work, I think). 
    Characters that can't be sent: 
    * The delineator characters: $#@ 
    * Numbers written immediately after a value that could have contained those digits: 
     * 0,1,2,3,4,5,6,7,8,9 for decimal 
     * 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,A,B,C,D,E,F for hex 
     * 0,1 for binary 

回答

1

一開始,deliminator很可能是分隔符,雖然我注意到你的文字中有兩種視線引導和Deliminator - 分隔也許deliminator是一個特殊的分隔符/終止子組合:-)

但是,分隔符通常用於分隔字段,通常無論如何都存在。你有什麼是一個可選的前綴,它決定了下面的字段類型。所以我可能會把它稱爲「前綴」或「類型前綴」。

「包含值表達式的格式化字符串」我只需調用「值表達式字符串」或「值字符串」將其更改爲更短的形式。

另一個可能的問題:

必須在-128到255(含),因爲它們必須符合8個字節

我想你的意思8

+0

值表達式字符串仍然太長,嗯。也許跟着「糟糕的Namign指南」VlxprssnStrng會更好,jk。 你確定刪除者不應該是轉義字符嗎? – 2010-02-28 11:16:06

+0

我認爲確實是文檔「8bit」中的另一個錯誤,我知道有很多。 – 2010-02-28 11:34:16

1

嘗試類似如下:

 
    ==== Value string encoding ==== 
    The value string is at the core of the data used for low level 
    transmissions. 

    Within the value string the following refixes are used: 
    # decimal 
    $ Hex 
    @ binary 
    No prefix - ASCII. 

    An optional sign may be included after the delimiter for negative numbers. 
    Negative numbers are represented using twos complement. 

    The value string may contain multiple values: 
    eg: "a#[email protected]$-0F" 

    All elements of the value string must represent an 8bit value and must 
    be in the range -128 to 255 

    When using ASCII representation the following characters that can't be sent 
    * The delineator characters: $#@ (use prefixed hex value.) 
    * Numbers written immediately after a value that could have 
     contained those digits: 
     * 0,1,2,3,4,5,6,7,8,9 for decimal 
     * 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,A,B,C,D,E,F for hex 
     * 0,1 for binary