WebSiphon 2 Guide: What's New
contents prev next

  1. W*API Plug-in version
  2. New statements and keywords
  3. Built-in Variables for Error Handling
  4. HTTP upload & multipart form data functions
  5. NetworkLib 2.0 functions
  6. Other new functions
W*API Plug-in version

WebSiphon 2 is now available as either an ACGI application or W*API Plug-in.

New statements/keywords/variables

Exception handling - scope-nested try/catch exception handling has been added. This also introduces the new throw() function.

The form of a try statement is:

try
    ...statements that may cause a Runtime Error...
    (or)
    throw(errCode, errString)
catch
    ...statements executed if an error occurs..
    (or)
    throw(errCode, errString);  // Sends an exception to next higher nested try/catch block.
end try;

try/catch will also catch any builtin-function Runtime errors.

Built-in Variables for Error Handling

These variables are available when using try/catch statements.

siphon_error_messageThe textual message returned for an error
siphon_error_numberThe numerical error
siphon_error_source_fileThe source file producing the error
siphon_error_file_pathThe path to the error producing file
siphon_error_line_numberThe line number of the error
siphon_error_uriThe URI that produced the error
siphon_error_full_requestThe full headers of the request that produced the error

Note: some of these error variables may not be set, depending on the type of error.

Misc New Built-in Variables

siphon_osOperating System version.
siphon_versionWebSiphon version.
siphon_sapiWebSiphon API version.
http_versionversion of HTTP used by browser
cgi_host_nameHost as defined in the client request
user_agent_osclient OS - not all browsers send this value
user_agent_cpuclient CPU type - not all browsers send this value
connection_typefrom full HTTP request
client_acceptfrom full HTTP request
client_accept_languagefrom full HTTP request
client_accept_encodingfrom full HTTP request

New Keywords

downto keyword for use in repeat from statements

repeat with i from 10 downto 1
     print i & " ";
end repeat;

>> 10 9 8 7 6 5 4 3 2 1
HTTP upload & multipart form data functions
File Upload functions allow you to use HTTP file upload to
ulSaveFile
ulContentType
ulFileSize
ulFileName
ulFileStatus
NetworkLib 2.0 functions

Babel 1.0 from Flaming LogoWare has been incorporated into NetworkLib 2.0. Babel 1.0 is therefore incompatible with NetworkLib 2.0

FTPConnect
FTPDeleteFile
FTPDisconnect
FTPGetFile
FTPListDir
FTPPutFile
HTTPGet
HTTPPost
POP3Connect
POP3CountMessages
POP3DeleteMessage
POP3Disconnect
POP3GetMessage
POP3ListMessages
Other new functions

- isQuitting() function, to determine if Siphon is in the middle of a quit sequence.

- New math intrinsics:

x = asin(x);
x = acos(x);
x = atan(x);
rads = radians(degs);
degs = degrees(rads);
pi = pi();
exp = exp();

contents prev next

Copyright (c)1996-2003 Purity Software