Explore chapters and articles related to this topic
Programming, Automation and Scripting
Published in Ionuţ Gabriel Ghionea, Cristian Ioan Tarbă, Saša Ćuković, CATIA v5, 2023
Ionuţ Gabriel Ghionea, Cristian Ioan Tarbă, Saša Ćuković
Programming languages have a more or less rigid syntax, the knowledge of which depends on the successful creation of a script. In CATIA v5, the basic features of the syntax are as follows: Comments are added using the apostrophe (‘), either at the beginning of a line or at the end of a line of code. It is recommended that comments be added as many times as necessary to document the code;Indentation is used to reflect the logical structure and make the code easier to read;Parentheses are used to get the expected result, e.g. order of operations;Colon (:) is used when you want to add multiple commands on the same line of code;Spaces are ignored by VBA, but are added to improve the clarity of the code;Underscore (_) – a character that is used to concatenate lines of code.
Command and Control
Published in R. Kurt Barnhart, Douglas M. Marshall, Eric J. Shappee, Introduction to Unmanned Aircraft Systems, 2021
To define what “open source” is, there are two important types of code in the software world that we need to talk about first. One type is called source code. Humans can read and understand this type of code, and this is what software developers use to write programs using the programming language of their choice. Developers can usually add their own comments or notes about the function of a certain section of code they have written; these comments can help the developer remember and help others understand what that section does. This source code is kept on hand and tweaked and improved for future versions. Once satisfied with a version, the developer feeds their code into a compiler. This throws away all the comments and translates all the human-readable code into object code. Generally, the object code or machine code is made up of the raw zeros and ones that a machine (microcontroller, computer processor, etc.) can understand. Everything from firmware to operating systems to the apps that people download to their smartphones is made up of bits of object code. If one were to open an object code file as a text document, it would appear as gibberish. If change had to be made to it to add a feature, it would be nearly impossible without the object code.
Computer Programming
Published in Quamrul H. Mazumder, Introduction to Engineering, 2018
Almost all high-level programming languages allow the programmer to include comments within their code. The purpose of comments is to add details and/or explanation of how the code is intended to function. Comments are purely for the programmer’s benefit and are not executed or processed by the computer at all. They are discarded when the program is compiled and do not exist in the machine code. Depending on the language, a special character or character sequence indicates the beginning of a comment section. In some cases, an end of the comment section is also indicated, but many languages assume that once the character or character sequence has been encountered, the comment continues until the end of that line in the code.
SENSMG: First-Order Sensitivities of Neutron Reaction Rates, Reaction-Rate Ratios, Leakage, keff, and α Using PARTISN
Published in Nuclear Science and Engineering, 2018
A forward slash (/) designates that the rest of the line is a comment. Forward slashes are required to end material composition lines and reaction-rate ratio lines. Each line of the input file is free format, but the lines must be in a certain order. In some cases, the entries on a line must also be in a certain order. This section describes the order.