core
Core module of Dinfio, this module provides core functions. e.g. array()
, object()
, size()
, etc. Note: This module is imported by default, you don't need to import it again.
arguments
— An array that stores command line argumentsdinfio
— A default instance of class dinfio_info
. This constant stores all of Dinfio information
address()
— Get the address of an array or an objectappend()
— Add new element to the end of an arrayarray()
— Create an array with n
elementsarray2d()
— Create two-dimensional arrayarray_random()
— Create an array filled with random numbersattribute_exists()
— Check whether the object obj
has attribute attr
or notattribute_get()
— Get the value of the object's attributeattribute_set()
— Set value to the object's attributeattributes()
— Get the attributes of an objectband()
— Perform bitwise AND operation for the every bit of the given number x
and y
bls()
— Perform left shift operation for the every bit of the given number x
by y
placesbnot()
— Perform bitwise NOT operation for the given number x
. Every bit of x
will be invertedbor()
— Perform bitwise OR operation for the every bit of the given number x
and y
brs()
— Perform right shift operation for the every bit of the given number x
by y
placesbxor()
— Perform bitwise XOR operation for the every bit of the given number x
and y
call()
— Call the function that stored in f
(ref
object)clear()
— Remove all of the elements of an arrayequal()
— Check whether value_1
and value_2
have the same addresseval()
— Call the function that stored in f
(ref
object) and return its valueexecute()
— Execute system command. This is similar to C/C++'s system()
functionexit()
— Exit from the programextend()
— Extend obj_1
to obj_2
. All of attributes and functions of obj_2
will be inherited to obj_1
iif()
— Inline if
functioninherits()
— Get the inheritance of an objectis_nothing()
— Check whether value
is nothing
or notkeys()
— Get the keys of an arrayobject()
— Create an empty objectobject_name()
— Get the name of an objectplatform()
— Choose value based on the operating systemplatform_linux()
— Choose value based on your operating system is Linux or notplatform_mac()
— Choose value based on your operating system is macOS or notplatform_windows()
— Choose value based on your operating system is Windows or notpop()
— Remove the first element of an arrayregister_event_loop()
— Register user defined event loopsize()
— Get the number of elements of an arraytype()
— Get the data type of value
var_exists()
— Check whether a variable is declared or not
dinfio_info
— This class stores all of Dinfio information. Note: This class has no instantiation (constructor) method, please use constant dinfio
instead
ref
— This class stores function address for further use
construct()
— The constructor. Create an instance of class ref
and store address of a function. To call the function, use function call()
or eval()