From: Wolfgang Bumiller Date: Thu, 20 Dec 2012 19:56:08 +0000 (+0100) Subject: manpage: -fcorrect-logic, -ftrue-empty-strings, -ffalse-empty-strings X-Git-Tag: 0.2~40 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8dc66969572b208a74075dea58cd8ef09a4a899e;p=xonotic%2Fgmqcc.git manpage: -fcorrect-logic, -ftrue-empty-strings, -ffalse-empty-strings --- diff --git a/doc/gmqcc.1 b/doc/gmqcc.1 index 6d1d658..defe7d0 100644 --- a/doc/gmqcc.1 +++ b/doc/gmqcc.1 @@ -297,6 +297,31 @@ soption. Normally vectors generate 4 defs, once for the vector, and once for its components with _x, _y, _z suffixes. This option prevents components from being listed. +.TP +.B -fcorrect-logic +Most QC compilers translate if(a_vector) directly as an IF on the +vector, which means only the x-component is checked. This causes all +non-float types to use an appropriate NOT instruction on all logic +operations and invert their use. +.in +4 +.nf +if (a_vector) // becomes +if not(!a_vector) +// likewise +a = a_vector && a_float // becomes +a = !!a_vector && a_float +.fi +.in +.TP +.B -ftrue-empty-strings +An empty string is considered to be true everywhere. The NOT_S +instruction usually considers an empty string to be false, this option +effectively causes the unary not in strings to use NOT_F instead. +.TP +.B -ffalse-empty-strings +An empty string is considered to be false everywhere. This means loops +and if statements which depend on a string will perform a NOT_S +instruction on the string before using it. .SH CONFIG The configuration file is similar to regular .ini files. Comments start with hashtags or semicolons, sections are written in square