|
Description Syntax Return
Datatype Example Migration
Right Function - Visual Basic 6.0
(VB 6.0) |
Returns a specified number of characters from the
right side of a string. |
|
Syntax: |
Right(string,length)
Parameter |
Description |
string |
Required. Any valid string expression. |
length |
Required. Numeric expression indicating how many characters
to return. |
|
Return Data type: |
|
String |
Example: |
Statement |
Result |
Remark |
Right("abcd", 2) |
cd |
|
|
Right("abcd", 0) |
|
Empty String |
|
Right("abcd", 5) |
abcd |
|
|
Right("abcd", 4) |
abcd |
|
|
Right("abcd", -1) |
Error |
Invalid procedure call or argument |
|
Right("abcd", null) |
Error |
Invalid use of Null |
|
Right(null, 2) |
Null |
|
|
Right(True, 3) |
rue |
|
|
Right(False, 3) |
lse |
|
|
Right("abcd", True) |
Error |
Invalid procedure call or argument |
|
Right("abcd", False) |
|
Empty String |
|
Right(unknown, 3) |
|
Empty String |
 |
|
|
Migration from Visual Basic 6.0 (VB 6.0) to |
|
Right Function in VB Script (VBS) |
|
Right Function in JScript (JS) |
|
Right Function in ASP (Active Server Page) |
|
Right Function in PHP Script |
|
Right Function in MS-Access |
|
Right Function in MS SQL Server |
|
Right Function in Oracle |
|
Right Function in C Language |
|
Right Function in C++ Language |
|
Right Function in Foxpro |
|
Right Function in Fortran |
|
Right Function in MS Excel Sheet |
 |
|
|
|
|