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  

G

  • Built-in function
  • getcookie()
    Description
    Returns the value of the cookie by specifying a name of a cookie
    The value of the cookie is stored on the client computer. You can set cookies using the setcookie() function.
    Syntax
    ret = getcookie(name)
    Parameters
    name:Cookie name
    Return Value
    string:Cookie
    NULL:Error or cookie
    System Return Value
    ERROR
    0Success
    1Argument error
    11Specified cookie name is not found
    Topへ
    getenv()
    Description
    Returns OS environmental variable specified by argument
    Syntax
    ret = getenv(string)
    Parameters
    string:Environment variable name
    Return Value
    NULL:Error or environment variable
    string:Environment variable
    System Return Value
    ERROR
    0Success
    1Argument error
    8GETENV error
    Example
    //[result example]
    //
    //OS=Windows_NT
    //
    
    run()
    exit
    
    function run()
    
    	print('OS=${getenv("OS")}')
    
    endfunction
    
    
    Topへ
    getopt()
    Description
    (Parases and) Returns the argument specified at command line
    If the number of arguments specified, the value of argument will be stored sequentially as array variable
    When there is no argument, a prompt will appear. The input character will be retunred.
    Syntax
    ret = getopt(string,{ … })
    Parameters
    string:Prompt for asking the user to input
    Default: 'ARG[n]=' (n represents the number of times the user inputs)
    { … }:multiple strings can be specified.
    Return Value
    NULL:Error or character string passed by the user
    string:Character string passed by the user
    System Return Value
    ERROR
    0Success
    2Output error
    3Input error
    Example
    //[result example]
    //
    // input word[1]: h
    // input word[2]: e
    // input word[3]: l
    // input word[4]: l
    // input word[5]: o
    // input word[6]:
    // input word[7]: w
    // input word[8]: o
    // input word[9]: r
    // input word[10]: l
    // input word[11]: d
    // input word[12]: exit
    // input word is hello world
    //
    
    exit input_stdin()
    
    function input_stdin()
    
    	local i
    	local input = ''
    	local word  = ''
    
    	loop i=1; ; i++
    		input = getopt('input word[${i}]: ')
    		if input eq 'q'
    			print( "input word is ${word}" )
    			break
    		else
    			word  = word & input
    		endif
    	endloop
    
    endfunction
    
    
    Topへ

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