User Guide

576 Chapter 12: Methods
URLEncode
Usage
URLEncode(proplist_or_string {, serverOSString} {, characterSet})
Description
Function; returns the URL-encoded string for its first argument. Allows CGI parameters to be
used in other commands. The same translation is done as for
postNetText and getNetText()
when they are given a property list.
Parameters
propListOrString
Required. Specifies the property list or string to be URL-encoded.
serverOSString Optional. Encodes any return characters in propListOrString. The value
defaults to
"Unix" but may be set to "Win" or "Mac" and translates any carriage returns in
propListOrString into those used on the server. For most applications, this setting is
unnecessary because line breaks are usually not used in form responses.
characterSet Optional. Applies only if the user is running on a Shift-JIS (Japanese) system. Its
possible settings are
"JIS", "EUC", "ASCII", and "AUTO". Retrieved data is converted from Shift-
JIS to the named character set. Returned data is handled exactly as by
getNetText() (converted
from the named character set to Shift-JIS). If you use
"AUTO", the posted data from the local
character set is not translated; the results sent back by the server are translated as they are for
getNetText(). "ASCII" is the default if characterSet is omitted. "ASCII" provides no
translation for posting or results.
Example
In the following example, URLEncode supplies the URL-encoded string to a CGI query at the
specified location.
URL = "http://aserver/cgi-bin/echoquery.cgi"
gotonetpage URL & "?" & URLEncode( [#name: "Ken", #hobby: "What?"] )
See also
getNetText(), postNetText
value()
Usage
value(stringExpression)
Description
Function; returns the value of a string. When value() is called, Lingo parses through the
stringExpression provided and returns its logical value.
Any Lingo expression that can be
put in the Message window or set as the value of a variable can
also be used with value().
These two Lingo statements are equivalent:
put sprite(2).member.duration * 5
put value("sprite(2).member.duration * 5")