![]() Unlike MathML and LaTeX, which use special syntax, Calcpad formats raw, simple text equations. This allows you to use Calcpad as a simple equation editor for faster typing of formulas. ![]() It not only hides the results, but also suppresses the calculations. #noc – displays only the equation, without the result #val – displays only the final result without the equation. #equ – displays the equation and the result Previously, there were only two visibility control keywords regarding equations: The alternative symbols are replaced with the original ones while typing. That is why, we introduced an alternative C/C++ like syntax that uses only keyboard symbols as follows: Operator Although Calcpad provides buttons for insertion, this is still slower than typing. Some relational operators in Calcpad use mathematical notation symbols like ≤, ≥, ≠, ≡, which are not available on computer keyboards. Inverse trigonometric functions can optionally return the results with units, if you define the variable: “ ReturnAngleUnits = 1“. They override all other settings, made in the Calpad UI or by using “ #deg“, “ #rad” and “ #grad” keywords in the code. Angle units are accepted by all trigonometric functions. You can convert between angle units and combine them with others to create composite ones like “ rad / s” and “ rev / min“. In the latest versions, native angle units are available for use: It will also show automatically if any error occurs in preprocessing. If you check the respective checkbox you will see it in the output window, instead of the calculation results. As a result, it generates “unwrapped” source code. ![]() Calcpad scans the code and rewrites the names with the actual contents. Modules, string variables and macros are parsed at preprocessor stage. The check is satisfied: τ = 120 MPa ≤ τ lim = 145 MPa ✓ The check is not satisfied: σ = 280 MPa > σ lim = 250 MPa ✖ 'The check is not satisfied:'x$'>'x_max$'✖ 'b$(Check): i$(f)sub$(yk) = err$(2) kN/cmsup$(2)Īnother interesting example is the following general design check routine: #def check$(x$ x_max$) For example, you can create Html “shortcodes” for faster and better formatting: #def b$(x$) = x$ It allows you to expand the Calcpad functionality with features that never existed before. This is a really powerful feature that can save a lot of work. Multiline macro: #def macro_name$(param1$ param2$. Inline macro: #def macro_name$(param1$ param2$. Multiline string variable: #def variable_name$ Inline string variable: #def variable_name$ = content All names must and with the “$” symbol and can include letters, numbers and underscore “_”. On the other hand, both can be inline of multiline. The difference between variables and macros is that macros have parameters, and variables don’t. Then, you can insert it wherever you like, by simply writing the name instead of the whole text. You can assign a piece of code to a string variable. This is a good way to further organize your code and avoid repetitions at a module level. Local parts will not be included into the external module. You can also select which part of the module is local and global by inserting the respective keywords: “ #local“, “ #global“. This is better than copying one and the same text in all worksheets. If the file is in the same folder, you can enter only the filename, otherwise you must specify the full path. Now, you can do this in Calcpad, using the following code: #include filename.cpd Then, it would be better to put this part in a separate module and reference it from all other worksheets. And each worksheet should start with identical content for selection of materials and cross sections. ![]() But imagine that you have to build an entire library for design of timber structures. If you have a simple and short worksheet, it is definitely easier to keep it all in a single file. In this post, we will make a short review of the most important changes. In the last several months, Calcpad was subjected to continuous improvement, driven by the efforts of its developers and the help of the community. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |