種類
- インスタンスメソッド (44)
- モジュール関数 (11)
キーワード
-
check
_ signedness (22) -
check
_ sizeof (22) - require (11)
検索結果
先頭5件
- Kernel
# check _ sizeof(type , headers = nil) -> Integer | nil - Kernel
# check _ sizeof(type , headers = nil) { . . . } -> Integer | nil - Kernel
# check _ signedness(type , headers = nil , opts = nil) -> "signed" | "unsigned" | nil - Kernel
# check _ signedness(type , headers = nil , opts = nil) { . . . } -> "signed" | "unsigned" | nil - Kernel
. # require(feature) -> bool
-
Kernel
# check _ sizeof(type , headers = nil) -> Integer | nil (9201.0) -
与えられた型のサイズを返します。
...グローバル変数 $defs に
"-DSIZEOF_type=X" を追加し、型のサイズを返します。型 type がシステムに
存在しない場合は、nil を返します。
例えば、
require 'mkmf'
check_sizeof('mystruct') # => 12
である場合、SIZEOF_MYSTRUCT=12 というプリプ... -
Kernel
# check _ sizeof(type , headers = nil) { . . . } -> Integer | nil (9201.0) -
与えられた型のサイズを返します。
...グローバル変数 $defs に
"-DSIZEOF_type=X" を追加し、型のサイズを返します。型 type がシステムに
存在しない場合は、nil を返します。
例えば、
require 'mkmf'
check_sizeof('mystruct') # => 12
である場合、SIZEOF_MYSTRUCT=12 というプリプ... -
Kernel
# check _ signedness(type , headers = nil , opts = nil) -> "signed" | "unsigned" | nil (3149.0) -
Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.
...may optionally
specify additional +headers+ to search in for the +type+.
If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+
name, followed by '=......signed, or negative integer if the +type+ is signed.
For example, if size_t is defined as unsigned, then
check_signedness('size_t') would returned +1 and the
SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the
compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is
done... -
Kernel
# check _ signedness(type , headers = nil , opts = nil) { . . . } -> "signed" | "unsigned" | nil (3149.0) -
Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.
...may optionally
specify additional +headers+ to search in for the +type+.
If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+
name, followed by '=......signed, or negative integer if the +type+ is signed.
For example, if size_t is defined as unsigned, then
check_signedness('size_t') would returned +1 and the
SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the
compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is
done... -
Kernel
. # require(feature) -> bool (3113.0) -
Ruby ライブラリ feature をロードします。拡張子補完を行い、 同じファイルの複数回ロードはしません。
...のホームディレクトリに展開されます。
Ruby ライブラリとは Ruby スクリプト (*.rb) か拡張ライブラリ
(*.so,*.o,*.dll など) であり、feature の拡張子が省略された場合はその
両方から探します( *.rb が優先されます)。
省略されな......せずに false を返します。
@param feature ファイル名の文字列です。
@raise LoadError ロードに失敗した場合に発生します。
//emlist[例][ruby]{
$LOADED_FEATURES.grep(/prime/).size # => 0
require "prime" # => true
$LOADED_FEATURES.grep(/prime/).size # => 1
req......uire "prime" # => false
begin
require "invalid"
rescue LoadError => e
e.message # => "cannot load such file -- invalid"
end
//}
@see Kernel.#load,Kernel.#autoload,Kernel.#require_relative...