Sex of the holder, to be specified by use of the single initial commonly used in the language of the State where the document is issued and, if translation into English, French or Spanish is necessary, followed by an oblique and the capital letter F for female, M for male, or X for unspecified.
Machine Readable Zone
F = female; M = male; < = unspecified. ※<は比較演算子ではなく<を使えという意味。
booleanで指定されていたりして (スコア:0)
たいとるおんりー
Re: (スコア:2, 参考になる)
パスポートのフォーマット規約見ると、男と女と未指定の3値が規定されていた。
https://www.icao.int/publ [icao.int]
Re: (スコア:0)
TrueとFalseとnullが欲しいときがある。
ternary型?
Re: (スコア:1)
Nullable型 [wikipedia.org]を使うんじゃない?
Re: (スコア:0)
プログラミング言語・ライブラリによっては、ternary logicを実現するデータ型を(boolのnullableとは別に)用意していることもある。たとえばC++のBoostのtribool。
Re:booleanで指定されていたりして (スコア:0)
便利やけど、覚えることがどんどん増えるな