Home | About SQeeL | Document | DownLoad | Mail Japanese
Home > Document > SQeeL Reference
A B C D E F G H I J L M N O P R S T U X Y  

L

  • Built-in variable
  • Built-in function
  • logout()
    Description
    Disconnects the current username from the database
    A session exists from the execution of the connect() until the logout() is executed
    You do not need to disconnect the current username from the database to reconnect to the database with the different username
    The current user is logged out of the database automatically when you quit the SQeeL
    The current transaction to the database is rolled back. (It does not commit pending changes to the database)
    Syntax
    ret = logout()
    Return Value
    1:Success
    0:Fail
    System Return Value
    ERROR
    0Success
    100Oracle error
    DBERR
    文字列Database error number
    DBERRMSG
    文字列Database message
    DBUSER
    文字列Connected username to database
    See Also
    Requirements
    dboralib.slb
    Example
    require 'dboralib.slb'
    
    run()
    exit
    
    function run()
    
    	connect('scott/tiger')
    	logout()
    
    endfunction
    
    
    Topへ
    log()
    Description
    Returns the natural logarithm (base e) of a given number
    Syntax
    ret = log(e)
    Parameters
    e:
    Return Value
    real number:Result
    0:Error or result
    System Return Value
    ERROR
    0Success
    1Argument error
    14Argument is negative
    Example
    //[result example]
    //
    // input number:2.3123
    // log(2.3123) = 0.838243
    //
    
    exit get_log()
    
    function get_log()
    
    	local input = 0
    
    	input = getopt('input number: ')
    	print("log("&input&") = "& log(input) )
    
    endfunction
    
    
    Topへ
    log10()
    Description
    Returns the common logarithm (base 10) of a given number
    Syntax
    ret = log10(e)
    Parameters
    e:
    Return Value
    real number:Result
    0:Error or result
    System Return Value
    ERROR
    0Success
    1Argument error
    14Argument is negative
    Example
    //[result example]
    //
    // input number:1000
    // log10(1000) = 3.000000
    //
    
    exit get_log10()
    
    function get_log10()
    
    	local input = 0
    
    	input = getopt('input number: ')
    	print("log10("&input&") = "& log10(input) )
    
    endfunction
    
    
    Topへ
    LINE
    Description
    The current line of the file executed
    Read / Write
    r
    Type
    number
    initial value
    undefined
    Topへ
    length()
    Description
    Returns the length in characters of the value of STRING.
    Syntax
    ret = length(string)
    Parameters
    string:Character string
    Return Value
    integral number:Length of character string
    System Return Value
    ERROR
    0Success
    1Argument error
    Example
    //[result example]
    //
    //"Insight" length:7
    //"Technology" length:9
    //"Insight Technology" length:17
    //
    
    run()
    exit
    
    function run()
    	local a = 'Insight'
    	local a = 'Technology'
    	local c = a & b
    	print('"' & a & '" length :' & length(a) & '\n',stdout)
    	print('"' & b & '" length :' & length(b) & '\n',stdout)
    	print('"' & c & '" length :' & length(c),stdout)
    endfunction
    
    
    Topへ
    lower()
    Description
    Converts character string to lower-case letters
    Syntax
    ret = lower(string)
    Parameters
    string:Character string to be converted to lower-case character
    Return Value
    string:Converted character string
    System Return Value
    ERROR
    0Success
    1Argument error
    See Also
    Example
    //[result example]
    //
    // insight technology
    //
    
    run()
    exit
    
    function run()
    	local a = 'INSIGHT TECHNOLOGY'
    	
    	print(lower(a),stdout)
    endfunction
    
    
    Topへ
    lpad()
    Description
    Pads the string specified by STRING2 to left side of STRING1. Returns the part of string specified by N parameters
    If the length in characters of the value of STRING1 is longer than N parameters, returns the part in STRING1 within N parameters.
    Syntax
    ret = lpad(string1,n,string2)
    Parameters
    string1:Character string to be converted
    n:Length of character string after conversion
    string2:Character string to be padded
    Default: single blank space
    Return Value
    string:Converted character string
    System Return Value
    ERROR
    0Success
    1Argument error
    See Also
    Example
    //[result example]
    //
    // 1:12345
    // 2:ab12345678
    //
    
    run()
    exit
    
    function run()
    	local a = '12345678'
    	local b = 'abcdefg'
    	print(lpad(a, 5,b))
    	print(lpad(a,10,b))
    
    endfunction
    
    
    Topへ
    ltrim()
    Description
    Delete characters from the left side of the character string until the specified character(deletion_char) is found.
    Delete blank space from the character string when the character(deletion_char) is not specified
    Syntax
    ret = ltrim(string,deletion_char)
    Parameters
    string:Character string to be converted
    deletion_char:Character string containing a letter to be deleted
    Default: single blank space
    Return Value
    string:Converted character string
    System Return Value
    ERROR
    0Success
    1Argument error
    See Also
    Example
    //[result example]
    //
    // XxyINSIGHT
    //
    
    run()
    exit
    
    function run()
    	local a = 'xyxyyXxyINSIGHT'
    	local b = 'yx'
    	print(ltrim(a, b))
    
    endfunction
    
    
    Topへ

    © Insight Technology, Inc. 1996-2003 All Rights Reserved.