Octal_Python暫定仕様(1)

 %811:Python8(1)
`▼
--------------------------------------------------------------------------------
(0)8進数「□」を「`&□」と明示して「(1)①」に準拠した基本仕様を示す.

 ①「ASCII」文字の集合を「Chr7」と略記する.
 ②「Chr7」の文字列の集合を「Str7」と略記する.
 ③「Chr7」の文字コードを2進数で表現したときの値が
  「k」に等しい文字を「chr(k)」と略記する.
 ④「\」を用いて印刷できない文字(制御文字)を下記のように略記する.
  「chr(0)⇒'\0'」「chr(8)⇒'\b'」「chr(9)⇒'\t'」
  「chr(10)⇒'\n'」「chr(13)⇒'\r'」「chr(27)⇒'\e'」
 ⑤制御文字を含まない「Str7」の元(raw_str)「□」を「"□"」で明示する.
 ⑥「"□."」を「名前」と呼称して名前の集合を「Name7」と略記する.
 ⑦集合の名前は「英大文字」で始める.
 ⑧集合の元の名前は「英小文字」で始める.
 ⑨数値を代入できる名前「□.」を変数と呼称して「$□.」で明示する.
 ⑩「英字」で始まる名前の変数を「大域変数」と呼称して名前表で管理する.
 ⑪「□」が数字列である変数「$□.」を局所変数と呼称する.
 ⑫「局所変数」の有効範囲(scope)を行内に限定する.
 ⑬8進数「&□」より小さい非負の整数の集合を「Int(&□)」と略記する.
 ⑭「1」より小さい正の実数を8進表示した文字列「x」に対して
  「x」より小さい正の実数の集合を「Fract(x)」と略記する.
 ⑮整数部を「Int(&□)」の元,小数部を「Fract(x)」の元で表示した実数の集合を
  「Octal」と略記する.
 ⑯負の実数は演算子「-」を用いた式で表現する.
 ⑰比較演算子に「.lt,」「.eq,」「.gt,」「.le,」「.ne,」「.ge,」を用いる.
  /*〔8進数表示ではイベントフラグのオン・オフが分かり易い〕*/
(1)参考資料/*〔【%81□】is imported from %71□〕*/
 ⑩%810/*「Octal_Python暫定仕様(1)」*/@
https://www.blogger.com/blog/post/edit/6859150935899261916/7634402608090221064
 ⑪%811/*〔Paragraph【%811】(Basic Spec.)in【%810】〕*/
 ⑫%812/*〔Paragraph【%812】(Lexical Analysis)in【%810】〕*/
 ⑬%813/*〔Paragraph【%813】(Syntax aqnalysis)in【%810】〕*/
 ⑭%814/*〔Paragraph【%814】(Execution)in【%810】〕*/
 ⑮%815/*〔Paragraph【%815】(Exception)in【%810】〕*/
 ⑯%816/*〔Paragraph【%816】(Conventional Notation)in【%810】〕*/
(2)軽量化のための制約
 ①固定小数点表示の実数しか扱わない.
 ②字数の制限
 ・どの行も「&77文字」以下.
 ・どのモジュールも「&77行」以下.
 ・どのパッケージも「&7モジュール」以下.
(3)数値はすべて8進数で表示する!
 ・Every number is expressed not in decimal but in octal.
 ①「&□」=「\o□」/*〔「&77」=「&100-1」=「64 - 1」〕*/
 ②「&□」is convenient to calculate bitwise logic operation
 ③The following expressions are available.  /*【[%712](3)】*/
  「a .and, b」=「a & b」,「a .or, b」=「a | b」,「a .xor, b」=「a ^ b」.(4)Supplement to 「f(k):=k`?_」/*〔「(1)⑬」⇒「f(k) < k」〕*/
 ・「`?_」は唯一の「後置演算子(an operator placed after its operand)」
 ①A statement in which f(k) is contained is nondeterministic
 ②The value of f(k) is determined by 「console input」 or
  「pseudo random number in automatic debugging」

(5)If conditional expression is replaced by 「1`?_」,
  a generalized「while statemnt」is shown as follows:
  「\n `while_(1`?_) `:_
  「\n _   /*〔any statements〕*/
  「\n `continue_
  「\n /*〔end of this block〕*/
(6)Supplement to 「(5)」
 ①Let S(n) be the set of integer i such that (i > 0) and (i < n).
 ②Nondeteministic function f(k) defined in [%713](1)①
  corresponds to S(k).
 ③The value of f(k) is selected by 「console input」
  or 「pseudo-random number genenated by an automatic debugger」
 ④A simple way to avoid infinite loop is to use  「if-statement」
  having 「`break_」.
--------------------------------------------------------------------------------
`▲①②③④⑤⑥⑦⑧⑨⑩⑪⑫⑬⑭⑮⑯⑰⑱⑲⑳

%819:EOF(@L5M)

コメント

このブログの人気の投稿

「日記帳(2023 冬)」

ブログの教材で学ぶMATH(1)