hisso.li
  • Login
Show Navigation
  • Public

    • Groups

Conversation

Notices

  1. まちカドおるみん御嬢様 (orumin@mstdn.maud.io)'s status on Tuesday, 05-Jan-2021 00:03:08 JST まちカドおるみん御嬢様 まちカドおるみん御嬢様

    “Short story: The 0 tells the parser it's dealing with a constant (and not an identifier/reserved word). Something is still needed to specify the number base: the x is an arbitrary choice.”

    c - Why are hexadecimal numbers prefixed with 0x? - Stack Overflow https://stackoverflow.com/questions/2670639/why-are-hexadecimal-numbers-prefixed-with-0x

    In conversation Tuesday, 05-Jan-2021 00:03:08 JST from mstdn.maud.io permalink

    Attachments

    1. Why are hexadecimal numbers prefixed with 0x?
      Why are hexadecimal numbers prefixed as 0x? I understand the usage of the prefix but I don't understand the significance of why 0x was chosen.
    • まちカドおるみん御嬢様 (orumin@mstdn.maud.io)'s status on Tuesday, 05-Jan-2021 00:04:20 JST まちカドおるみん御嬢様 まちカドおるみん御嬢様
      in reply to
      • B̅

      cc @cmplstofB

      In conversation Tuesday, 05-Jan-2021 00:04:20 JST permalink
    • B̅ (cmplstofb@mathtod.online)'s status on Tuesday, 05-Jan-2021 00:25:45 JST B̅ B̅
      in reply to

      @orumin 私の大本の疑問は,0hではなく0xが選ばれた理由,もっと言えば後の世代に大いに影響を与えたあるプログラミング言語が0xを採用した理由なんですけど↓,Ref :https://mathtod.online/@cmplstofB/105497773143174541見たところその疑問を解決できる答えはありませんでした……。

      ↓この発言によるとhttps://stackoverflow.com/questions/2670639/why-are-hexadecimal-numbers-prefixed-with-0x#comment19844740_4581351> And that leaves either 0h or 0x (H e X idecimal). From this point it seems it's truly back to preference.ですが,"seem" ですし,なによりじゃあなぜ0xのほうが0hより〝好まれたのか〟が知りたいんです。

      In conversation Tuesday, 05-Jan-2021 00:25:45 JST permalink
    • まちカドおるみん御嬢様 (orumin@mstdn.maud.io)'s status on Tuesday, 05-Jan-2021 00:25:45 JST まちカドおるみん御嬢様 まちカドおるみん御嬢様
      in reply to
      • B̅

      @cmplstofB なぜ creat(2) が create(2) じゃなかったのかぐらい、とくに合理的根拠とかはなさそうな気がする(Unix ってそういうやっつけ仕事や勢いのネーミング多いので

      In conversation Tuesday, 05-Jan-2021 00:25:45 JST permalink
  • Help
  • About
  • FAQ
  • Privacy
  • Source
  • Version
  • Contact

hisso.li is a social network. It runs on GNU social, version 2.0.0-alpha0, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All hisso.li content and data are available under the Creative Commons Attribution 3.0 license.

Switch to desktop site layout.