Geeks With Blogs

News

Google My Blog

Catch me at: The List!


My InstallScript Utility Belt My Amazon Wishlist
My Standard Disclaimer


Archives
Chris G. Williams Beware: I mix tech and personal interests here.
I'm trying to port some code from C# to VB (mostly just for fun, but also to learn c# better)

I've got these lines in c#

private const uint MATRIX_A = 0x9908b0dfU;
private const uint UPPER_MASK = 0x80000000U;
private const uint LOWER_MASK = 0x7fffffffU;
private const int MAX_RAND_INT = 0x7fffffff;

and I can't figure out how to write them in VB. Yes I know the obvious syntactical differences, but I'm clueless on what to do with the hex numbers.

So basically I have this...

Private Const MATRIX_A As UInteger = 0x9908b0dfU
Private Const UPPER_MASK As UInteger = 0x80000000U
Private const LOWER_MASK as UInteger = 0x7fffffffU
Private const MAX_RAND_INT as Integer = 0x7fffffff

Which results in the BSOD (blue squiggle of death) under the hex numbers. Any help from you C# geniuses would be appreciated. I realize it's probably something incredibly obvious but I'm tired. Posted on Sunday, March 27, 2005 7:21 PM Game Development | Back to top



Comments on this post: I need help!

# re: I need help!
Requesting Gravatar...
I believe you need to replace 0x with &H for the VB representation. Double check though - since I haven't had to do that hex voodoo in quite some time...
Left by Julie Lerman on Mar 27, 2005 10:23 PM

# re: I need help!
Requesting Gravatar...
Hey thanks!! I'll try that...
Left by Chris on Mar 27, 2005 10:41 PM

Your comment:
 (will show your gravatar)


Copyright © Chris G. Williams | Powered by: GeeksWithBlogs.net