skip to content
Clarion Community Help
User Tools
Log In
Site Tools
Search
Tools
Show page
Old revisions
Backlinks
Recent Changes
Media Manager
Sitemap
Log In
>
Recent Changes
Media Manager
Sitemap
Trace:
soft_velocity_pragmas.htm
| **Navigation:** [[advanced topics 1.htm|Advanced Topics]] > Legacy Project System Reference >====== #pragmas ====== | [[conditional processing and flow control.htm|{{btn_prev_n.gif|Previous page}}]][[advanced topics 1.htm|{{btn_home_n.gif|Return to chapter overview}}]][[call pragmas.htm|{{btn_next_n.gif|Next page}}]] | | || [[soft velocity pragmas.htm#modula-2 pragma syntax|Modula-2 Pragma Syntax]] [[soft velocity pragmas.htm#old-type compiler directives|Old-type Compiler Directives]] [[soft velocity pragmas.htm#c and c pragma syntax|C_and_C++_Pragma_Syntax]] [[soft velocity pragmas.htm#project system pragma syntax|Project System Pragma Syntax]] [[soft velocity pragmas.htm#pragma classes|Pragma Classes]] [[call pragmas.htm|Call #pragmas]] [[data pragmas 1.htm|Data #pragmas]] [[code pragmas 1.htm#code pragmas|Code #pragmas]] [[check pragmas 1.htm#check pragmas|Check #pragmas]] [[name pragmas 1.htm#name pragmas|Name #pragmas]] [[optimize pragmas 1.htm#optimize pragmas|Optimize #pragmas]] [[debug pragmas 1.htm#debug pragmas|Debug #pragmas]] [[module pragmas 1.htm#module pragmas|Module #pragmas]] [[option pragmas 1.htm#option pragmas|Option #pragmas]] [[warn pragmas 1.htm#warn pragmas|Warn #pragmas]] [[project pragmas 1.htm#project pragmas|Project #pragmas]] [[save restore pragmas.htm#save restore pragmas|Save/Restore #pragmas]] [[link pragmas 1.htm#link pragmas|Link #pragmas]] [[link option pragmas 1.htm#link option pragmas|Link_Option #pragmas]] [[define pragmas.htm|Define #pragmas]] [[predefined compiler flags.htm#pre-defined flags|Pre-defined Flags]] All SoftVelocity languages, and the Project System, use a common set of compiler options known as //#pragmas//. In general, pragmas may appear in the source code or in a project file, and the effect will be the same. {{notebox.jpg|NoteBox.jpg}} **A pragma can be used in the Project language, C++ code, Modula-2 code, or Clarion code. Some only work in certain places. A ****'P'**** to the right of the pragma indicates it can be used in the Project language, a ****'C'**** indicates it can be used in C++ code, a ****'M'**** indicates it can be used in Modula-2 code, and a ****'W' ****indicates that it can be used in Clarion code (CLW files).** __**Modula-2 Pragma Syntax**__ Pragmas in SoftVelocity Modula-2 occur in a special form of comment which begins with '(*#'. For example: **(*# check( index => off ) *)** __**Old-type Compiler Directives**__ In the original version of SoftVelocity Modula-2, compiler directives starting with a $ were used to specify compiler options. These directives are still accepted in later versions of SoftVelocity Modula-2, with the following exceptions: ·$B (Ctrl-Break handler). This is no longer supported. Use Lib.EnableBreakCheck instead. ·$D (data segment name). This is supported, but adds the suffix _BSS (for uninitialized data) or _DATA (for initialized data) to the name instead of the D_ prefix. ·$J (use IRET instead of RET). This is not supported. Instead, you should use the pragma: **(*# call( interrupt => on ) *)** ·However, you may find that you have to make other changes as well as the effect of the pragma is different from the $J directive: ·$K (C calling convention). This is not supported. Instead, you should use the pragma: **(*# call( c_conv => on ) *)** ·$M (code segment name). This is supported but adds the suffix _TEXT to the name instead of the C_ prefix. ·$P (external names for local procedures). This is no longer supported. It is no longer applicable. ·$Q (procedure tracing). This is no longer supported. Instead, you should use the pragma: **(*# debug( proc_trace => on ) *)** ·This enables a different method of tracing procedures. Refer to the proc_trace pragma for further details. ·$X (80x87 stack spilling). This is no longer supported (and is no longer necessary). ·$Z (NIL pointer checks). This still does NIL pointer checks but no longer clears memory. ·$@ (preserve DS). This is no longer supported. The support for these directives has been included with later systems so that your old programs and modules will recompile with minimum changes. However, you should avoid using the old directives with new programs, and use pragmas instead. __**C and C++ Pragma Syntax**__ Pragmas are an integral part of the C and C++ languages, and are implemented as compiler directives: **#pragma check( index => off )** __**Project System Pragma Syntax**__ Pragmas in the Project System use a similar syntax to the C and C++ languages: **#pragma check(index => off)** Pragmas in the Project System may also be specified in the #compile command, to apply to a single compilation. For example: **#compile mandel.mod /debug(vid=>on)** __**Pragma Classes**__ A #pragma takes the form #pragma class(name=>value). The #pragma classes are as follows: **[[call pragmas.htm|Call #pragmas]]** **[[check pragmas 1.htm|Check #pragmas]]** **[[code pragmas 1.htm|Code #pragmas]]** **[[data pragmas 1.htm|Data #pragmas]]** **[[debug pragmas 1.htm|Debug #pragmas]]** **[[define pragmas.htm|Define #pragmas]]** **[[pragma filecopy.htm|File pragmas]]** **[[link pragmas 1.htm|Link and Linkfirst #pragmas]]** **[[link option pragmas 1.htm|Link_option #pragmas]]** **[[module pragmas 1.htm|Module #pragmas]]** **[[name pragmas 1.htm|Name #pragmas]]** **[[optimize pragmas 1.htm|Optimize #pragmas]]** **[[option pragmas 1.htm|Option #pragmas]]** **[[project pragmas 1.htm|Project #pragmas]]** **[[save restore pragmas.htm#save restore pragmas|Save and Restore #pragmas]]** **[[warn pragmas 1.htm|Warn #pragmas]]**
soft_velocity_pragmas.htm.txt
· Last modified: 2021/04/15 15:57 by
127.0.0.1
Page Tools
Show page
Old revisions
Backlinks
Back to top