Why doesn't CONST like ATN? 
Author Message
 Why doesn't CONST like ATN?

I've tried to enter a formula for pi as a constant using a formula for
inverse sine I found in my old GWB manual (ARCSIN(X)=ATN(X/SQR(-X*X+1)),
but when I try to use this formula in a constant, it gives me "Invalid
constant". It works fine as a variable, so what's wrong?
(I use .5 for X and multiply the result by 2)
--
Cogito Ergo Um - I think therefore I .. er ...



Thu, 30 Nov 2000 03:00:00 GMT  
 Why doesn't CONST like ATN?

Quote:

>I've tried to enter a formula for pi as a constant using a formula for
>inverse sine I found in my old GWB manual (ARCSIN(X)=ATN(X/SQR(-X*X+1)),
>but when I try to use this formula in a constant, it gives me "Invalid
>constant". It works fine as a variable, so what's wrong?
>(I use .5 for X and multiply the result by 2)

Check out the last sentence in this snip from the QB 4.5 help on CONST.

  CONST Statement Details

  Syntax
    CONST constantname = expression [,constantname = expression]...

    Argument       Description
    constantname   A name following the same rules as a BASIC variable
                   name. You may add to the name a type-declaration
                   character (%, &, !, #, or $) to indicate its type,
                   but this character is not part of the name.

    expression     An expression consisting of literals (such as 1.0),
                   other constants, or any of the arithmetic and
                   logical operators except exponentiation (^). You may
                   also use a single literal string such as "Error on
                   input". You cannot use string concatenation,
                   variables, user-defined functions, or intrinsic
                   functions like SIN or CHR$ in expressions assigned
                   to constants.
--
Judson McClendon          This is a faithful saying and worthy of all
Sun Valley Systems        acceptance, that Christ Jesus came into the

(please remove numbers from email id to respond)



Thu, 30 Nov 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Why oh why doesn't this work?

2. Code doesn't work, why?

3. Why doesn't this MAPISendMail work?

4. Why doesn't this button work?

5. SQL in VB doesn't work - why?

6. Why doesn't this work?

7. Why doesn't Access always add properly?

8. Why doesn't this work???

9. Why doesn't this BCC me?

10. Why doesn't this work?!!

11. Why doesn't this work?

12. Why doesn't field information refresh with custom forms on OL2K with VBA

 

 
Powered by phpBB® Forum Software