2016-03-23 10 views

答えて

6

あなたはデータ型の詳細については、i helper in IExを使用することができます。

iex> i [9] 
Term 
    '\t' 
Data type 
    List 
Description 
    This is a list of integers that is printed as a sequence of characters 
    delimited by single quotes because all the integers in it represent valid 
    ASCII characters. Conventionally, such lists of integers are referred to as 
    "char lists" (more precisely, a char list is a list of Unicode codepoints, 
    and ASCII is a subset of Unicode). 
Raw representation 
    [9] 
Reference modules 
    List 

あなたは生の表現を検査する場合は、inspectchar_lists: falseを渡すことができます。

IO.inspect('abc', char_lists: false) 
[97, 98, 99] 
+0

どのように私は、元になるだろう値9はそこからnumに入りますか? – theKing

+0

値は '[9]'です.IExはそれをASCII文字のリストとして表します。私の編集を参照してください。 – Gazler

+0

申し訳ありませんが、私は正しく説明していません。リストから9を9として引っ張り、変数にバインドする必要があります。しかし、理解では、9は '\ t'として出てくる – theKing

関連する問題