UniBasic Commands Reference - Rocket Software
UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software
1-86 UniBasic Commands Reference Return Code Status 1 Invalid request handle. 2 Invalid parameter. 3 Bad content type. addRequestParameter Return Codes (continued) Note: For a GET request, content_handling is ignored. For a POST request with default content type, the default for content_handling is “Content-Type:text/plain” if content_handling is not specified. For a POST request with “Multipart/*” content-type, content_handling is a dynamic array containing Content-* strings separated by field marks (@FM). They will be included in the multipart message before the data contained in parameter_value is sent. An example of content_handling: Content-Type: application/XML @FM Content-Dispostion: attachment; file=”C:\drive\test.dat” @FM Content-Length: 1923 Specifically, for a POST request with content type “multipart/form-data”, a “Content-Dispostion: form-data” header will be created (or, in the case of Content- Dispostion already in content_handling, “form-data” will be added to it). For both a GET and a POST request with either no content type specified or specified as “application/x-www-form-urlencoded”, as described in createRequest(), URL encoding is performed on data in parameter_value automatically. Basically, any character other than alpha-numeric is considered “unsafe” and will be replaced by %HH where HH is the ASCII value of the character in question. For example, ‘#’ is replaced by %23, and ‘/’ is replaced by %2F, etc.. One exception is that by convention, spaces (‘ ‘) are converted into ‘+’. For a POST method with other MIME-type specified, no encoding is done on data contained in parameter_value.
ALPHA Syntax ALPHA("str.expr") Description The UniBasic ALPHA function tests a string to see if it is composed entirely of alphabetic characters. If str.expr is made entirely of alphabetic characters (not special characters, escape sequences, or the null value), the function returns 1. If numeric or other characters are present in str.expr, or if str.expr evaluates to an empty string or the null value, the function returns 0. Because UniBasic does not recognize multibyte characters as alphabetic, ALPHA returns 0 instead of converting them. Examples In the following example, the program statement prints 0 because the literal string contains the numeric character 2: PRINT ALPHA("ABCDEFGHIJK2") In the next example, the program segment prints 1 because the string ALPHA contains only alphabetic characters: ALPHA.T=ALPHA("CORONA") PRINT ALPHA.T In the next example, the program statement prints 0 because the string does not contain any characters. An empty string is not considered to be an alphabetic character. PRINT ALPHA("") ALPHA 1-87
- Page 29 and 30: Example In the following example, t
- Page 31 and 32: Parameters The following table desc
- Page 33 and 34: $UNDEFINE Syntax $UNDEFINE var Desc
- Page 35 and 36: * Syntax expr * expr Synonyms !, RE
- Page 37 and 38: *= Syntax var *= expr Description T
- Page 39 and 40: += Syntax var += expr Description T
- Page 41 and 42: -= Syntax var -= expr Description T
- Page 43 and 44: = Syntax var /= expr Description Th
- Page 45 and 46: ^ Syntax expr1^expr2 Synonym ** Des
- Page 47: < is a synonym for the LT (less tha
- Page 50 and 51: = 1-55 UniBasic Commands Reference
- Page 52 and 53: =< 1-57 UniBasic Commands Reference
- Page 54 and 55: 1-59 UniBasic Commands Reference >
- Page 56 and 57: @ Syntax @(col.expr [,row.expr]) @(
- Page 58 and 59: 1-63 UniBasic Commands Reference Op
- Page 60 and 61: Examples In the following example,
- Page 62 and 63: [] Syntax 1-67 UniBasic Commands Re
- Page 64 and 65: {} {} is a synonym for the CALCULAT
- Page 66 and 67: Note: You can use the ECL ON.ABORT
- Page 68 and 69: ABS Syntax ABS(expr) Description Th
- Page 70 and 71: Parameter Description 1-76 UniBasic
- Page 72 and 73: ACTIVATEKEY Syntax ACTIVATEKEY , [
- Page 74 and 75: STATUS Code Example 1-80 UniBasic C
- Page 76 and 77: Parameters 1-82 UniBasic Commands R
- Page 78 and 79: Parameter Description format 1 - PE
- Page 82 and 83: amInitialize Syntax 1-88 UniBasic C
- Page 84 and 85: amReceiveMsg Syntax amReceiveMsg(hS
- Page 86 and 87: amReceiveRequest Syntax amReceiveRe
- Page 88 and 89: amSendMsg Syntax 1-94 UniBasic Comm
- Page 90 and 91: amSendRequest Syntax amSendRequest(
- Page 92 and 93: amSendResponse Syntax amSendRespons
- Page 94 and 95: amTerminate Syntax amTerminate(hSes
- Page 96 and 97: analyzeCertificate Syntax analyzeCe
- Page 98 and 99: AND Syntax expr1 AND expr2 Synonym
- Page 100 and 101: ASIN Syntax ASIN(expr) Description
- Page 102 and 103: Related Command UniData TERM - For
- Page 104 and 105: BITAND Syntax BITAND(num.expr1,num.
- Page 106 and 107: BITOR Syntax BITOR(num.expr1,num.ex
- Page 108 and 109: BPIOCP Syntax BPIOCP Description Th
- Page 110 and 111: BPIOCPN Syntax BPIOCPN Description
- Page 112 and 113: BREAK Syntax BREAK [KEY] {ON | OFF
- Page 114 and 115: BYTELEN Syntax BYTELEN (string) Des
- Page 116 and 117: Example In the following example, t
- Page 118 and 119: Parameters The following table desc
- Page 120 and 121: CALLC Syntax CALLC c.sub.name [(arg
- Page 122 and 123: CASE Syntax BEGIN CASE CASE express
- Page 124 and 125: In the next example, the program se
- Page 126 and 127: Related Commands UniBasic CATS, SPL
- Page 128 and 129: CHAIN Syntax CHAIN "str.expr" Descr
ALPHA<br />
Syntax<br />
ALPHA("str.expr")<br />
Description<br />
The <strong>UniBasic</strong> ALPHA function tests a string to see if it is composed entirely of<br />
alphabetic characters. If str.expr is made entirely of alphabetic characters (not special<br />
characters, escape sequences, or the null value), the function returns 1. If numeric or<br />
other characters are present in str.expr, or if str.expr evaluates to an empty string or<br />
the null value, the function returns 0.<br />
Because <strong>UniBasic</strong> does not recognize multibyte characters as alphabetic, ALPHA<br />
returns 0 instead of converting them.<br />
Examples<br />
In the following example, the program statement prints 0 because the literal string<br />
contains the numeric character 2:<br />
PRINT ALPHA("ABCDEFGHIJK2")<br />
In the next example, the program segment prints 1 because the string ALPHA<br />
contains only alphabetic characters:<br />
ALPHA.T=ALPHA("CORONA")<br />
PRINT ALPHA.T<br />
In the next example, the program statement prints 0 because the string does not<br />
contain any characters. An empty string is not considered to be an alphabetic<br />
character.<br />
PRINT ALPHA("")<br />
ALPHA 1-87