return | |
Type | constant |
Dictionary | LCS |
Library | LiveCode Script |
Syntax |
|
Synonyms | cr,linefeed,lf |
Summary | Equivalent to the line feed character (ASCII 10, Control-J). |
Introduced | 1.0 |
Changes | The LF synonym was added in version 2.0. |
OS | mac, windows, linux, ios, android |
Platforms | desktop, server, mobile |
Example |
|
Related | Keyword: binfile, character, characters, file, URL Constant: CRLF, formfeed Property: script Command: constant, open driver, open file, open process Function: numToChar, numToCodepoint, platform, textEncode, textDecode Glossary: ASCII, command, delimiter, Mac OS, platform, statement, Unix, Unicode, Windows |
Description | Use the return constant as an easier-to-read substitute for numToChar(10) or numToCodepoint(10). The return constant is needed because you can't type the character it represents in a scripting statement. The return constant is a synonym for the line feed character (ASCII 10, Control-J). This is different from some other languages, in which return is equivalent to the carriage return character (ASCII 13, Control-M). For most purposes, LiveCode translates the linefeed constant and its synonyms into the appropriate end-of-line character for the current operating system. However, you should keep this nuance in mind when processing data from another system, which LiveCode has not translated:return is not ASCII 13. The line feed character is the standard end-of-line delimiter on Unix systems. The end-of-line delimiter for Mac OS systems is a carriage return (ASCII 13), and the end-of-line delimiter for Windows systems is a carriage return followed by a line feed (ASCII 13 + ASCII 10). Internally, LiveCode always uses a line feed (ASCII 10) to end lines.
|
Tags | text processing |