mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2005-08-29, 00:20   #1
Myndex
 
Aug 2005

2 Posts
Default VIsual Basic Implementation Problem

Hello,

I have been trying to implement twister into a VBA app.

I am using the version by Pablo Mariano Ronchi

http://www.math.sci.hiroshima-u.ac.j...37arVBcode.txt



WHat happens is that when pasting the code into a VBA module, VBA changes it.

These constant declarations are written as:


Const MATRIX_A As Long = &H9908B0DF '/* constant vector a */
Const UPPER_MASK As Long = &H80000000 '/* most significant w-r bits */



But VBA changes them to:

Const MATRIX_A As Long = &H-66F74F21 '/* constant vector a */
Const UPPER_MASK As Long = &H-80000000 '/* most significant w-r bits */


And, then they don't work in excel 2003 (I'm developing in excel 2004 OS X).


I'm thinking I need to make them unsigned longs, but how in VBA?

thanks!


ANdy
Myndex is offline   Reply With Quote
Old 2005-08-29, 01:29   #2
JHagerson
 
JHagerson's Avatar
 
May 2005
Naperville, IL, USA

22×72 Posts
Default

Would this help? Microsoft KB Article
JHagerson is offline   Reply With Quote
Old 2005-08-29, 01:35   #3
Myndex
 
Aug 2005

210 Posts
Default

Quote:
Originally Posted by JHagerson
Would this help? Microsoft KB Article
Thank you - however, this code was written for VBA - so, I'd think the writer would have taken this into account - can't believe it would be posted at the MT main page with such a flaw, so I've assumed I've been doing something wrong...

ANdy
Myndex is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
GMP-ECM with Visual Studio 2015 Brian Gladman GMP-ECM 0 2016-09-29 11:33
Visual Studio (yech) R.D. Silverman Programming 12 2015-09-07 00:54
Using YAFU in Visual Studio queremendi YAFU 12 2015-07-09 15:40
Basic ECM Implementation now working Sam Kennedy Factoring 4 2012-11-03 17:59
Visual Basic? Lethe Programming 5 2005-04-21 01:10

All times are UTC. The time now is 21:41.

Tue Jan 19 21:41:55 UTC 2021 up 47 days, 17:53, 0 users, load averages: 1.79, 1.91, 1.88

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.