Главная

Популярная публикация

Научная публикация

Случайная публикация

Обратная связь

ТОР 5 статей:

Методические подходы к анализу финансового состояния предприятия

Проблема периодизации русской литературы ХХ века. Краткая характеристика второй половины ХХ века

Ценовые и неценовые факторы

Характеристика шлифовальных кругов и ее маркировка

Служебные части речи. Предлог. Союз. Частицы

КАТЕГОРИИ:






Functions for working with strings




 

Function Appointment Description
LCASE$ (symbolic_ locution) The function returns a character string in which all letters converted to lowercase CLS READ Word$ PRINT LCASE$(Word$) DATA “THIS IS THE STRING in lower case”
UCASE$ (symbolic_ locution) The function returns a character value, in which all the letters - uppercase.  
LTRIM$ (symbolic_ locution) Returns a copy of the string with leading spaces removed  
RTRIM$ (symbolic_ locution) Returns a character string formed by removing spaces right  
SPACE$ (n) Returns a string of length n spaces  
STRING$ (m, n) STRING$ (m, symbolic_ locution) Returns a string filled with the symbols of the ASCII - code or data symbol m - a numeric expression, string length
INSTR ([start, ] line 1, строка 2) It returns the position of the first occurrence of a substring in the specified line the n - numeric expression in the range 0-255, the character code - filler
LEFT$(symbolic_ locution, n) RIGHT (symbolic_ locution, n) Returns a string containing n left / right characters of the original string symbolic_ locution - specifies the string, the first character which is used to fill lines
MID$ (symbolic_ locution, start [, lenght]) The function returns a fragment of a specified string Home - an offset from the beginning of the line
STR$ (numeric_ locution выражение) Returns a character representation of a number or numerical expression  
LEN (symbolic_ locution) Returns the number of characters of the line.  

 

Example: the name of the transformation of the form "Name Last Name" in the form of "Last Name"

CLS

LINE INPUT “Name: “; Nm$

Sposs=INSTR(1, Nm$, “ ”)

IF Sposs=0 THEN

PRINT Nm$ ‘Enter just Surname

ELSE

Surname$=RIGHT$(Nm$, LEN(Nm$)-Sposs)

Firstname$=LEFT$(Nm$, Sposs-1)

PRINT Surname$; “,“; Firstname$

END IF

END

Tasks






Не нашли, что искали? Воспользуйтесь поиском:

vikidalka.ru - 2015-2024 год. Все права принадлежат их авторам! Нарушение авторских прав | Нарушение персональных данных