|
-
May 18th, 2005, 02:10 PM
#1
Thread Starter
Frenzied Member
real stupid notation question [SOLVED]
In someone elses code, I see the following:
VB Code:
variablename = 1#
' and
variablename2 = 1!
What is the difference and what do they mean?
Last edited by ober0330; May 18th, 2005 at 02:28 PM.
-
May 18th, 2005, 02:14 PM
#2
-
May 18th, 2005, 02:18 PM
#3
Thread Starter
Frenzied Member
Re: real stupid notation question
But they still basically equate to 1, correct? I'm converting a VBA app to PHP and I'm trying rule out problems in a calculation I'm having problems with.
-
May 18th, 2005, 02:20 PM
#4
Re: real stupid notation question
 Originally Posted by ober0330
But they still basically equate to 1, correct? I'm converting a VBA app to PHP and I'm trying rule out problems in a calculation I'm having problems with.
Well, those should only be nessisary if you need to do accurate floating point calculations, otherwise you should be fine with Integer or Long 
Cheers and good luck with your project,
RyanJ
-
May 18th, 2005, 02:20 PM
#5
Re: real stupid notation question
A VB Single data type is a 4 byte floating point number
A VB Double data type is a 8 byte floating point number
So, when you go to declare those variables in PHP, they may have to be declared with the PHP equivalents in order for the calculation to work.
-
May 18th, 2005, 02:22 PM
#6
Thread Starter
Frenzied Member
Re: real stupid notation question
Ok, that's what I thought. Thanks. And weird to see you around Hack... I thought you had gone away forever (but then again, I haven't been here in months).
-
May 18th, 2005, 02:23 PM
#7
Re: real stupid notation question
 Originally Posted by ober0330
Ok, that's what I thought. Thanks. And weird to see you around Hack... I thought you had gone away forever (but then again, I haven't been here in months).
Good to see you back to ober (I was away for about a year actually. )
-
May 18th, 2005, 02:24 PM
#8
Thread Starter
Frenzied Member
Re: real stupid notation question
I wouldn't say I'm really "back"... I'm not doing a whole lot of VB lately... I'm trying to get 75% of my company's apps on the web.
Anyways, hopefully I'll see you around.
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
|