类中函数模板 typeof_Julia中的typeof()函数
生活随笔
收集整理的這篇文章主要介紹了
类中函数模板 typeof_Julia中的typeof()函数
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
類中函數(shù)模板 typeof
Julia| typeof()函數(shù) (Julia | typeof() function)
typeof() function is a library function in Julia programming language, it is used to get the concrete type of the given value or variable.
typeof()函數(shù)是Julia編程語言中的庫函數(shù),用于獲取給定值或變量的具體類型。
Syntax:
句法:
typeof(x)Here, x is the value/variable whose data type to be found.
在此, x是要查找其數(shù)據(jù)類型的值/變量。
Example:
例:
typeof(10)Int64x = 10typeof(x)Int64x = 'A'typeof(x)Chartypeof(Int64)DataTypeProgram:
程序:
# Example of typeof() function in Julia# type of values println("typeof(0): ", typeof(0)) println("typeof(10): ", typeof(10)) println("typeof(-10): ", typeof(-10)) println("typeof(10.23): ", typeof(10.23)) println("typeof('A'): ", typeof('A')) println("typeof(\"Hello\"): ", typeof("Hello")) println()# type of variables a = 0 b = 10 c = -10 d = 10.23 e = 'A' f = "Hello"println("typeof(a): ", typeof(a)) println("typeof(b): ", typeof(b)) println("typeof(c): ", typeof(c)) println("typeof(d): ", typeof(d)) println("typeof(e): ", typeof(e)) println("typeof(f): ", typeof(f)) println()# type of data type println("typeof(Bool): ", typeof(Bool)) println("typeof(Int64): ", typeof(Int64)) println("typeof(Float64): ", typeof(Float64)) println("typeof(Char): ", typeof(Char)) println("typeof(String): ", typeof(String)) println()Output
輸出量
typeof(0): Int64 typeof(10): Int64 typeof(-10): Int64 typeof(10.23): Float64 typeof('A'): Char typeof("Hello"): Stringtypeof(a): Int64 typeof(b): Int64 typeof(c): Int64 typeof(d): Float64 typeof(e): Char typeof(f): Stringtypeof(Bool): DataType typeof(Int64): DataType typeof(Float64): DataType typeof(Char): DataType typeof(String): DataTypeReference: Julia Core.typeof()
參考: JuliaCore.typeof()
翻譯自: https://www.includehelp.com/julia/typeof-function.aspx
類中函數(shù)模板 typeof
總結(jié)
以上是生活随笔為你收集整理的类中函数模板 typeof_Julia中的typeof()函数的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 计算机图形学图形旋转_计算机图形学翻译
- 下一篇: 4 曝光_荣耀户外手表GS Pro曝光: