代码之家  ›  专栏  ›  技术社区  ›  Frames Catherine White

文档的正确术语[关闭]

  •  1
  • Frames Catherine White  · 技术社区  · 14 年前

    下面的文档是一个模块的文档,该模块现在已“退役” 我写的是替代品。 在我写下替代品之前,我想让我的条款正确。 我知道文档中的术语是错误的-它很快就被破解了 所以我可以指导一所大学,在这个项目的硬件方面,如何使用我做的程序。 可以找到完整的纪录片 here 对于任何感兴趣的人(对我们wiki上写的和添加的内容感兴趣),该网站可能只对某些IP可用(取决于您的ISP-大学的互联网连接最有可能工作),并且SVN回购是私有的。

    所以有很多术语是错误的。 例如。
    除沫器
    包含值表达式的格式化字符串 (现在可能是错的,但很难说)

    正确的术语是什么? 我还犯了什么错误

    
        ==== 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#21@1001111$-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
    
    2 回复  |  直到 14 年前
        1
  •  1
  •   paxdiablo    14 年前

    首先,除莠符可能是分隔符,尽管我注意到您的文本中既有轮廓符又有除莠符-也许除莠符是一个特殊的分隔符/终止符组合:—)

    但是,分隔符通常用于分隔字段,并且无论出现什么,分隔符通常都存在。您所拥有的是一个可选前缀,用于指定以下字段类型。所以我可能会称之为“前缀”或“类型前缀”。

    “包含值表达式的格式化字符串”我只需要调用“值表达式字符串”或“值字符串”将其更改为较短的格式。

    另一个可能的问题是:

    必须在-128到255(含)之间,因为它们必须适合8字节

    我想你的意思是8 .

        2
  •  1
  •   Richard Harrison    14 年前

    尝试如下操作:

         ==== 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#21@1001111$-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