C logic equivilent in VBA?

o1110010

Registered User.
Local time
Today, 15:07
Joined
Mar 6, 2004
Messages
182
Just a wandering thought, not too terrible or requiring an answer.

In C/C++ this logic works:

int a, b, c;
c = 0;
a = b = c + 1;
printf("A equals %d B equals %d C equals %d", a, b, c);


the output would be "A equals 1 B equals 1 C equals 0"

is there any way VBA can be manipulated to do the same thing (as what's in bold) besides seperate lines?
 
01110010,

Nope.

There are a lot of 'C' constructs that VBA doesn't support.

VBA doesn't support a union data structure.

Would be nice if VBA had intCounter++

Would be nice if 'C' saw strings as other than arrays or function arguments.

Wayne
 
Thank you Wayne. As you can tell, I'm just stepping into VBA from other programming experience. Suppose VBA doesn't have the option to tack on ThisIsMyCodeIAlwaysUse.h too? :p (Just copy/paste previously generated code?)
 
b=c+1:a=b :D

I know, I know... just having some fun.

wait till you find out it's not object oriented. oops, did I say to much. :p That was my biggest hurdle when I started using vb/vba.

as far as your .h files go just use custom .bas files and then add them to each project with the functions all being public.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom