|
-
Feb 28th, 2009, 06:21 PM
#1
Thread Starter
PowerPoster
[RESOLVED] Maths.
Hi Guys,
In VB6, the following code gives me the error "Method or data member not found"
Z = r1 * r2 * (pi / 2 + Math.asin(dFuelDepth / r2))
the highlighted item is asin
The error message appears immediately the sub containing the code is called. The sub is not even entered.
Any ideas please
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Feb 28th, 2009, 06:25 PM
#2
Re: Maths.
Error is pretty self explanatory - asin function does not exist. There is a Sin instead.
What are you calculating, anyway? Don't you get dropdown list of available members of Math class when you type Math and a dot?
Last edited by RhinoBull; Feb 28th, 2009 at 06:38 PM.
-
Feb 28th, 2009, 06:32 PM
#3
Thread Starter
PowerPoster
Re: Maths.
Hi,
I am calibrating a dipstick for an elliptical cross section oil tank.
The ASIN() function does NOT appear in the dropdown list after Math. but it is clearly documented in MSDN help.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Feb 28th, 2009, 06:36 PM
#4
Re: Maths.
I assume this is .Net so I moved it from the VB6 forum.
-
Feb 28th, 2009, 06:41 PM
#5
Thread Starter
PowerPoster
Re: Maths.
Hi
No, As I said in the first post, it is VB6. I am a little rusty in VB6 but am amending an old program.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Feb 28th, 2009, 06:42 PM
#6
Re: Maths.
 Originally Posted by taxes
The ASIN() function does NOT appear in the dropdown list after Math. but it is clearly documented in MSDN help.
As Martin correctly guessed ASin only exists in .Net but you posted in VB6 which is not the same as VB 2002-2008 (aka vb.net).
VB6 does not have that function.
-
Feb 28th, 2009, 06:42 PM
#7
Re: Maths.
in 2008 there is Math.Asin
-
Feb 28th, 2009, 06:44 PM
#8
-
Feb 28th, 2009, 06:51 PM
#9
Thread Starter
PowerPoster
Re: Maths.
 Originally Posted by RhinoBull
As Martin correctly guessed ASin only exists in .Net but you posted in VB6 which is not the same as VB 2002-2008 (aka vb.net).
VB6 does not have that function.
According to MSDN Library Visual Studio 6.0 the ASIN() function returns a numeric expression.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Feb 28th, 2009, 06:55 PM
#10
Re: Maths.
Again: VB6 does not offer that function.
If you reading MSDN then you must in the wrong secrtion - check Applies To if available or perhaps what language (you could be prompted to select one when you try to open specific tiopic).
-
Feb 28th, 2009, 06:56 PM
#11
Thread Starter
PowerPoster
Re: Maths.
Hi guys,
I have it now. I have to use Atn(x/Sqr(-x*x+1))
!!!!
Thanks everyone.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Feb 28th, 2009, 06:58 PM
#12
Re: Maths.
Right, but you could've at least admited that function you were refering to doesn't exist so other won't get confused.
Regards.
-
Feb 28th, 2009, 07:49 PM
#13
Thread Starter
PowerPoster
Re: Maths.
 Originally Posted by RhinoBull
Right, but you could've at least admited that function you were refering to doesn't exist so other won't get confused.
Regards.
OK.... WARNING TO ALL. The ASIN() Function) clearly detailed in MSDN Library Visual Studio 6.0 is NOT recognised by VB6. The ARCSIN can be replicated using the procedure detailed in MSDN Derived Maths Functions.
Happy?
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Feb 28th, 2009, 08:26 PM
#14
Re: Maths.
 Originally Posted by taxes
OK.... WARNING TO ALL. The ASIN() Function) clearly detailed in MSDN Library Visual Studio 6.0 is NOT recognised by VB6.
That is because ASIN function is defined in C/C++/VC++, VFP and JScript (as far as MS concerns).
So, when browsing MSDN you have to pay attention to language function belongs in.
-
Feb 28th, 2009, 09:48 PM
#15
Re: Maths.
 Originally Posted by RhinoBull
So, when browsing MSDN you have to pay attention to language function belongs in.
Rhino, that my be the understatement of the year. I have been trapped ny MSDN numerous times, thinking that what is there will work with VB6. It tends to make me long for reference books that are gone forever.
-
Mar 1st, 2009, 07:56 AM
#16
Thread Starter
PowerPoster
Re: Maths.
 Originally Posted by RhinoBull
That is because ASIN function is defined in C/C++/VC++, VFP and JScript (as far as MS concerns).
So, when browsing MSDN you have to pay attention to language function belongs in.
Agreed. But my point is that, if you look up the ASIN() description in MSDN, it nowhere states that the function is limited to a specific language. So, being naieve, I assumed that it was available in VB6. Yes, if you look up Arcsine it makes it clear, but I first looked up Asin.
Anyway, my problem is solved and I have clarified it up as per your earlier post.
AGAIN, THANKS GUYS.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|