[Gambas-devel] Constant Macro Use

Randall Morgan rmorgan62 at ...176...
Tue Jan 31 21:17:55 CET 2012


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 at ...176...>wrote:

> Ok will do,
>
> Thank you again!
>
>
> 2012/1/31 Benoît Minisini <gambas at ...1...>
>
>> 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 at 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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20120131/cb4209bb/attachment.html>


More information about the Devel mailing list