Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / PowerBuilder [игнор отключен] [закрыт для гостей] / Справочник по функциям / 3 сообщений из 3, страница 1 из 1
16.11.2006, 17:01
    #34134178
Dimano
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Справочник по функциям
Привет, тут задачка свалилась, надо разобратся с куском кода на PowerBuilder, я его в глаза не видел.
Помогите пожалуйста разобраться с функциями или отошлите в документацию

RIGHT, ASC, CHAR, MID

Вроде как функции простые и можно догадаться что они делают по аналогии с другими языками. Но что-то невытанцовывается :( может есть какие-то нюансы.
...
Рейтинг: 0 / 0
16.11.2006, 17:16
    #34134272
urvas
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Справочник по функциям
Right PowerScript function

Description

Obtains a specified number of characters from the end of a string.

Syntax

Right ( string, n )

Argument Description
string The string from which you want characters returned
n A long whose value is the number of characters you want returned from the right end of string
Return value

String. Returns the rightmost n characters in string if it succeeds and the empty string ("") if an error occurs. If any argument's value is null
, Right returns null. If n is greater than or equal to the length of the string, Right returns the entire string. It does not add spaces to make the return value's length equal to n.

/*------------------------------------*/

Asc PowerScript function

Description

Converts the first character of a string to its Unicode code point. A code point is the numerical integer value given to a Unicode character. .

Syntax

Asc ( string )

Argument Description
string The string for which you want the code point value of the first character
Return value

Unsigned Integer. Returns the code point value of the first character in string. If string is null, Asc returns null.

Usage

You can use Asc to find out the case of a character by testing whether its code point value is within the appropriate range.

/*------------------------------------*/
Description

Extracts the first Unicode character of a string or converts an integer to a char.

Syntax

Char ( n )

Argument Description
n A string that begins with the character you want, an integer you want to convert to a character, or a blob in which the first value is a string or integer. The rest of the contents of the string or blob is ignored. N can also be an Any variable containing a string, integer, or blob.
Return value

Char. Returns the first Unicode character of n. If n is null, Char returns null.


/*------------------------------------*/

Description

Obtains a specified number of characters from a specified position in a string.

Syntax

Mid ( string, start {, length } )

Argument Description
string The string from which you want characters returned.
start A long specifying the position of the first character you want returned. (The position of the first character of the string is 1).
length (optional) A long whose value is the number of characters you want returned. If you do not enter length or if length is greater than the number of characters to the right of start, Mid returns the remaining characters in the string.
Return value

String. Returns characters specified in length of string starting at character start. If start is greater than the number of characters in string, the Mid function returns the empty string (""). If length is greater than the number of characters remaining after the start character, Mid returns the remaining characters. The return string is not filled with spaces to make it the specified length. If any argument's value is null, Mid returns null.

Usage

To search a string for the position of the substring that you want to extract, use the Pos function. Use the return value for the start argument of Mid. To extract a specified number of characters from the beginning or end of a string, use the Left or the Right function.
...
Рейтинг: 0 / 0
17.11.2006, 08:30
    #34135244
Dimano
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Справочник по функциям
Большое спасибо , разобрался!
...
Рейтинг: 0 / 0
Форумы / PowerBuilder [игнор отключен] [закрыт для гостей] / Справочник по функциям / 3 сообщений из 3, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]