[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gambas-devel
Subject:    Re: [Gambas-devel] Constant Macro Use
From:       Randall Morgan <rmorgan62 () gmail ! com>
Date:       2012-01-31 20:17:55
Message-ID: CAGwqEL40PU9cuRbfG7W6r0GtHjxqKJsEAtiBr1N65pA7RyoCbQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


I just remembered why I included the "M_" it is because some of the
constants contain M_x_ where x is a digit. So removing "M_" results in an
illegal name.

Randall

On Tue, Jan 31, 2012 at 11:42 AM, Randall Morgan <rmorgan62@gmail.com>wrote:

> Ok will do,
>
> Thank you again!
>
>
> 2012/1/31 Benoît Minisini <gambas@users.sourceforge.net>
>
>> Le 31/01/2012 20:33, Randall Morgan a écrit :
>> > Relevant code from class description structure:
>> >
>> >      GB_CONSTANT("M_E", "f", "2.7182818284590"),   /* e
>> 4523536028747135 */
>> >      GB_CONSTANT("M_LOGE", "f", "1.44269504088896340735992468100"),  /*
>> > LOG_E */
>> >      GB_CONSTANT("M_LOG10E", "f", "0.43429448190325182765112891892"),
>> /*
>> > log_10 (e) */
>> >      GB_CONSTANT("M_SQRT2", "f", "1.41421356237309504880168872421"),
>>  /*
>> > sqrt(2) */
>> >      GB_CONSTANT("M_SQRT1_2", "f", "0.70710678118654752440084436210"),
>> > /* sqrt(1/2) */
>> >      GB_CONSTANT("M_SQRT3", "f", "1.73205080756887729352744634151"),
>> > /* sqrt(3) */
>> >      GB_CONSTANT("M_PI", "f", "3.14159265358979323846264338328"),
>> >   /* pi */
>> >      GB_CONSTANT("M_PI_2", "f", "1.57079632679489661923132169164"),
>> >   /* pi/2 */
>> >      GB_CONSTANT("M_PI_4", "f", "0.78539816339744830961566084582"),
>> >   /* pi/4 */
>> >      GB_CONSTANT("M_SQRTPI", "f", "1.77245385090551602729816748334"),
>> >   /* sqrt(pi) */
>> >      GB_CONSTANT("M_2_SQRTPI", "f", "1.12837916709551257389615890312"),
>> >   /* 2/sqrt(pi) */
>> >      GB_CONSTANT("M_1_PI", "f", "0.31830988618379067153776752675"),
>> >   /* 1/pi */
>> >      GB_CONSTANT("M_2_PI", "f", "0.63661977236758134307553505349"),
>> >   /* 2/pi */
>> >      GB_CONSTANT("M_LN10", "f", "2.30258509299404568401799145468"),
>> >   /* ln(10) */
>> >      GB_CONSTANT("M_LN2", "f", "0.69314718055994530941723212146"),
>> > /* ln(2) */
>> >      GB_CONSTANT("M_LNPI", "f", "1.14472988584940017414342735135"),
>> >   /* ln(pi) */
>> >      GB_CONSTANT("M_EULER", "f", "0.57721566490153286060651209008"),
>> > /* Euler constant */
>> >
>>
>> This will be the supported syntax. Just remove the "M_" part of the
>> constant name, it is not necessary, as they are element of the Gsl class.
>>
>> Regards,
>>
>> --
>> Benoît Minisini
>>
>>
>> ------------------------------------------------------------------------------
>> Keep Your Developer Skills Current with LearnDevNow!
>> The most comprehensive online learning library for Microsoft developers
>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>> Metro Style Apps, more. Free future releases when you subscribe now!
>> http://p.sf.net/sfu/learndevnow-d2d
>> _______________________________________________
>> Gambas-devel mailing list
>> Gambas-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-devel
>>
>
>
>
> --
> If you ask me if it can be done. The answer is YES, it can always be done.
> The correct questions however are... What will it cost, and how long will
> it take?
>



-- 
If you ask me if it can be done. The answer is YES, it can always be done.
The correct questions however are... What will it cost, and how long will
it take?

[Attachment #5 (text/html)]

I just remembered why I included the &quot;M_&quot; it is because some of the \
constants contain M_x_ where x is a digit. So removing &quot;M_&quot; results in an \
illegal name.<div><br></div><div>Randall<br><br><div class="gmail_quote">

On Tue, Jan 31, 2012 at 11:42 AM, Randall Morgan <span dir="ltr">&lt;<a \
href="mailto:rmorgan62@gmail.com">rmorgan62@gmail.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex">

Ok will do,<div><br></div><div>Thank you again!</div><div><div><div \
class="h5"><br><br><div class="gmail_quote">2012/1/31 Benoît Minisini <span \
dir="ltr">&lt;<a href="mailto:gambas@users.sourceforge.net" \
target="_blank">gambas@users.sourceforge.net</a>&gt;</span><br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Le 31/01/2012 20:33, Randall Morgan a écrit :<br> \
<div><div>&gt; Relevant code from class description structure:<br> &gt;<br>
&gt;      GB_CONSTANT(&quot;M_E&quot;, &quot;f&quot;, &quot;2.7182818284590&quot;),   \
/* e 4523536028747135 */<br> &gt;      GB_CONSTANT(&quot;M_LOGE&quot;, &quot;f&quot;, \
&quot;1.44269504088896340735992468100&quot;),  /*<br> &gt; LOG_E */<br>
&gt;      GB_CONSTANT(&quot;M_LOG10E&quot;, &quot;f&quot;, \
&quot;0.43429448190325182765112891892&quot;),   /*<br> &gt; log_10 (e) */<br>
&gt;      GB_CONSTANT(&quot;M_SQRT2&quot;, &quot;f&quot;, \
&quot;1.41421356237309504880168872421&quot;),    /*<br> &gt; sqrt(2) */<br>
&gt;      GB_CONSTANT(&quot;M_SQRT1_2&quot;, &quot;f&quot;, \
&quot;0.70710678118654752440084436210&quot;),<br> &gt; /* sqrt(1/2) */<br>
&gt;      GB_CONSTANT(&quot;M_SQRT3&quot;, &quot;f&quot;, \
&quot;1.73205080756887729352744634151&quot;),<br> &gt; /* sqrt(3) */<br>
&gt;      GB_CONSTANT(&quot;M_PI&quot;, &quot;f&quot;, \
&quot;3.14159265358979323846264338328&quot;),<br> &gt;   /* pi */<br>
&gt;      GB_CONSTANT(&quot;M_PI_2&quot;, &quot;f&quot;, \
&quot;1.57079632679489661923132169164&quot;),<br> &gt;   /* pi/2 */<br>
&gt;      GB_CONSTANT(&quot;M_PI_4&quot;, &quot;f&quot;, \
&quot;0.78539816339744830961566084582&quot;),<br> &gt;   /* pi/4 */<br>
&gt;      GB_CONSTANT(&quot;M_SQRTPI&quot;, &quot;f&quot;, \
&quot;1.77245385090551602729816748334&quot;),<br> &gt;   /* sqrt(pi) */<br>
&gt;      GB_CONSTANT(&quot;M_2_SQRTPI&quot;, &quot;f&quot;, \
&quot;1.12837916709551257389615890312&quot;),<br> &gt;   /* 2/sqrt(pi) */<br>
&gt;      GB_CONSTANT(&quot;M_1_PI&quot;, &quot;f&quot;, \
&quot;0.31830988618379067153776752675&quot;),<br> &gt;   /* 1/pi */<br>
&gt;      GB_CONSTANT(&quot;M_2_PI&quot;, &quot;f&quot;, \
&quot;0.63661977236758134307553505349&quot;),<br> &gt;   /* 2/pi */<br>
&gt;      GB_CONSTANT(&quot;M_LN10&quot;, &quot;f&quot;, \
&quot;2.30258509299404568401799145468&quot;),<br> &gt;   /* ln(10) */<br>
&gt;      GB_CONSTANT(&quot;M_LN2&quot;, &quot;f&quot;, \
&quot;0.69314718055994530941723212146&quot;),<br> &gt; /* ln(2) */<br>
&gt;      GB_CONSTANT(&quot;M_LNPI&quot;, &quot;f&quot;, \
&quot;1.14472988584940017414342735135&quot;),<br> &gt;   /* ln(pi) */<br>
&gt;      GB_CONSTANT(&quot;M_EULER&quot;, &quot;f&quot;, \
&quot;0.57721566490153286060651209008&quot;),<br> &gt; /* Euler constant */<br>
&gt;<br>
<br>
</div></div>This will be the supported syntax. Just remove the &quot;M_&quot; part of \
the<br> constant name, it is not necessary, as they are element of the Gsl class.<br>
<br>
Regards,<br>
<div><div><br>
--<br>
Benoît Minisini<br>
<br>
------------------------------------------------------------------------------<br>
Keep Your Developer Skills Current with LearnDevNow!<br>
The most comprehensive online learning library for Microsoft developers<br>
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,<br>
Metro Style Apps, more. Free future releases when you subscribe now!<br>
<a href="http://p.sf.net/sfu/learndevnow-d2d" \
target="_blank">http://p.sf.net/sfu/learndevnow-d2d</a><br> \
_______________________________________________<br> Gambas-devel mailing list<br>
<a href="mailto:Gambas-devel@lists.sourceforge.net" \
target="_blank">Gambas-devel@lists.sourceforge.net</a><br> <a \
href="https://lists.sourceforge.net/lists/listinfo/gambas-devel" \
target="_blank">https://lists.sourceforge.net/lists/listinfo/gambas-devel</a><br> \
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><div \
class="im">-- <br>If you ask me if it can be done. The answer is YES, it can always \
be done. The correct questions however are... What will it cost, and how long will it \
take?<br>



</div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>If you ask me if it can \
be done. The answer is YES, it can always be done. The correct questions however \
are... What will it cost, and how long will it take?<br>


</div>



------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d

_______________________________________________
Gambas-devel mailing list
Gambas-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic