Julia Juno Jupyter part1 [無断転載禁止]©2ch.net (745レス)
Julia Juno Jupyter part1 [無断転載禁止]©2ch.net http://mevius.5ch.net/test/read.cgi/tech/1455271513/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
必死チェッカー(本家)
(べ)
自ID
レス栞
あぼーん
102: デフォルトの名無しさん [] 2016/07/23(土) 11:05:54.45 ID:+Jc7SqHC x = UInt32(0x12345678) a = pointer_to_array(convert(Ptr{UInt8}, pointer_from_objref(x)), 4) a[2] = 51 println(@sprintf "%08X" x) # 0x12343378 http://mevius.5ch.net/test/read.cgi/tech/1455271513/102
103: デフォルトの名無しさん [] 2016/07/23(土) 11:07:52.09 ID:+Jc7SqHC immutable TT a::UInt16 b::UInt16 end x = UInt32(0x12345678) a = pointer_to_array(convert(Ptr{TT}, pointer_from_objref(x)), 1) println(a) # [TT(0x5678,0x1234)] a[].a = 0xaabb # ERROR: type TT is immutable http://mevius.5ch.net/test/read.cgi/tech/1455271513/103
104: デフォルトの名無しさん [] 2016/07/23(土) 11:12:28.69 ID:+Jc7SqHC type XX a::UInt16 b::UInt16 end x = UInt32(0x12345678) # ↑ここまでは動く a = pointer_to_array(convert(Ptr{XX}, pointer_from_objref(x)), 1) # ↑インタプリタ環境だとこれを実行した時点で環境ごと落ちる (下へ行くケースあり) println("reach here") println(a) # インタプリタの外から julia hoge.jl で実行したときは println(a) まで実行すると落ちる http://mevius.5ch.net/test/read.cgi/tech/1455271513/104
105: デフォルトの名無しさん [] 2016/07/23(土) 11:13:02.17 ID:+Jc7SqHC なぜでしょう?(unsafeなことしてるのは判ってるのですが・・・) http://mevius.5ch.net/test/read.cgi/tech/1455271513/105
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
Google検索
Wikipedia
ぬこの手
ぬこTOP
1.180s*