View Source Basic types In this chapter we will learn more about Elixir basic types: integers, floats, booleans, atoms, and strings. Other data types, such as lists and tuples, will be explored in the next chapter. iex> 1 # integer iex> 0x1F # integer iex> 1.0 # float iex> true # boolean iex> :atom # atom / symbol iex> "elixir" # string iex> [1, 2, 3] # list iex> {1, 2, 3} # tuple Basic arithmetic
なお、simple-vectorのように、fill-pointerなし、固定長、displacedでないベクタでありつつ、要素の型は指定したvectorを作成する場合は、simple-arrayのサブタイプを指定します。 ;; (unsigned-byte 8)を要素に持つベクタの型 (simple-array (unsigned-byte 8) (*)) など 型を指定した例 ;; 要素数 (defconstant 100_000_000 (expt 10 8)) vectorを指定 (fill-pointerあり、adjustable) (declaim (vector *big-vector-vector*)) (defvar *big-vector-vector* (make-array 100_000_000 :adjustable T :fill-pointer 100_000
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く