Introduction
Getting Started
Basic Syntax
Structures
Enumerations
Roles
User Interface
Procedures
Expressions
Translators
Contact, Questions, Discussion
Legal Notes
Updated 02/08/2018
All contents and concepts
©Webware nach Maß |
The Readable Programming Language - Handbook |
Basic SyntaxChapters, Sentences, WhitespaceA Lisilogic application is made up of chapters. The content of a chapter is code, made up of sentences. The sentences may contain tabs and line breaks. They will be treated like spaces by the compiler, but they can improve the readability. The ordering of chapters and sentences and the repartition of the sentences among chapters has only an influence if several parts of a
webpage are defined in several sentences. The parts will be translated in the order of the sentences and will appear in this order in the UI of the application. In the future, Lisilogic may allow to group the chapters in directories and/or the sentences in paragraphs with a title. CommentsAt this stage, there is no possibility to write comments in the code of a Lisilogic application. If explanations of the code seem needed (purpose of a function or structure, overview of a procedure, external references to norms, warnings and legal notes, ...), it is recommended to display them in the user interface, next to the concerned UI elements or on a "Help" or "Reference" page. Future developments of the programming environment may allow several kinds of informations attached to the code, corresponding to different uses of comments, tags and annotations in other programming languages:
If whished by many users, explanatory comments might be made possible at some point, when the available specialized code enrichment possibilities appear to be developed enough to prevent the tendency of programmers to encode things in comments, or to rely on comments as an excuse for unclear code. These explanatory comments could be implemented in form of side notes attached to a position in the code. Character StringsCharacter strings in Lisilogic are enclosed in double quotes ("). They find various utilizations:
Character strings may contain line breaks, tabs, and any character. Line breaks are preserved when displaying webpages, but not tabs or multiple spaces. String and text constants may contain calculated parts in braces ({}) Double quotes and opening braces inside character strings must be preceded with a backslash (\) IdentifiersIdentifiers in Lisilogic must start with a letter and must not contain any whitespace or punctuation. Uppercase and lowercase don't make a difference, but it is recommended that you write normally, that is, capitalizing only the first letter of each sentence. Identifiers are used to name
Some words are reserved and cannot be used as identifiers ( ListsLists with more than one element must start with a colon (:), may use a dash (minus sign, -) or an asterisk (*) to introduce each element,
and must use a comma (,) or a semicolon (;) to separate their elements. If there is an introducing character (- or *), it must be present for all elements of the list and must be the same throughout. Lists in lists are recognized using their introducing character and their separator. It is recommended to add a line break before each element
and to use indentation for better readability. NumbersIn Lisilogic, numbers can be associated with a unit, indicated after them. A unit may contain any character except dot, comma, colon or semicolon (.,:;), it may not contain whitespace (space, tab, or line break) and it may not start with a plus, a minus, an asterisk or a slash (+-*/). Units will be combined correctly, but there will be no automatic conversion: The % "unit" is handled according to its signification: Decimal numbers carry along their precision: Hint for conversions: provide the unit ratio along with the conversion factor: Email AddressesExplicit email addresses are written without quotes: They must not contain any whitespaces. Character strings will be converted automatically to email addresses if needed, for instance if they are added to a list of email addresses. In the future, Lisilogic may allow explicit conversion ("the email address ..."). URLsExplicit URLs are written without quotes and must begin with http://, https:// or mailto:. They must not contain any whitespaces, use %20 instead. Character strings will be converted automatically to urls if needed. In the future, Lisilogic may allow explicit conversion ("the url ..."). Date and Time ConstantsDate and time constants are written without quotes.
Character strings will be converted to dates or timestamps in reasonable cases (for instance when writing them into a date or timestamp attribute). Depending on the execution environment, more formats might be allowed, for instance, PHP is able to convert "Jun. 25th, 2015" to a date. In the future, Lisilogic may allow explicit conversion ("the date ...", "the timestamp ..."), and to use the word "at" as an operator ("the user's birthday at 12:00"). |