#1   Report Post  
Posted to microsoft.public.excel.misc
PST PST is offline
external usenet poster
 
Posts: 29
Default java to vba

hello

Is what somebody can translate this code into vba

thank you



declare partial_results as structure of
min = array of numbers[ 4 ]; //min[0] is match in six numbers,
min[1] is match in five numbers, etc
max = array of numbers[ 4 ];
comboCount as number;
end declare

function main
declare final_results as list;

for each c=1,2,3,4,5,6 to 44,45,46,47,48,49 do
results = new partial_results;
for each d=(tickets being tested) do
match = how_many_numbers_match( c, d );
increment( results, match );
end for
similar = find_similar_results( final_results, results );
if similar is NULL then
add results to final_results;
else
add( results, similar );
end if
end for

//now the final_results list contains all data for the coverage report
//the following applies to each item in this list:
//"comboCount tested combinations produce min[0] to max[0] of
jackpot hits,
//and min[1] to max[1] of 'match 5' hits and min[2] to max[2] of
'match 4' hits
//and min[3] to max[3] of 'match 3' hits
end function

function increment( res as partial_results, match as number )
index_to_increment = 4 - (match-2); //reverse the match index to
have highest match at index '0'
min[ index_to_increment ] = min[ index_to_increment ] + 1;
max[ index_to_increment ] = max[ index_to_increment ] + 1;
comboCount = comboCount+1;
end function

function add( res1 as partial_results, res2 as partial_results )
res2.comboCount = res2.comboCount + res1.comboCount;
for i=0 to 3 do
if res1.min[ i ] < res2.min[ i ] then
res2.min[ i ] = res1.min[ i ];
end if
if res1.max[ i ] res2.max[ i ] then
res2.max[ i ] = res1.max[ i ];
end if
end for
end function

function find_similar_results( list, results )
for each r=partial_results from the list do
for i=0 to 3 do
if results.max[ i ] 0 then
if results.max[i] = r.max[ i ] then
return r;
else
break;
end if
else if r.max[ i ] 0 then
break;
end if
end for
end for
return NULL;
end function
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default java to vba

On 9 May, 19:24, PST wrote:
hello

Is what somebody can translate this code into vba

thank you


Erm. Unlikely. Requires someone with knowledge of java and vba, who is
willing to reverse engineer your code and replicate in another
language. Hardly a learning experience. Try rentacoder.

And you've cross posted this in a SIX different groups.

LOL.

Andrew

  #3   Report Post  
Posted to microsoft.public.excel.misc
PST PST is offline
external usenet poster
 
Posts: 29
Default java to vba

thank you
and how do you know

And you've cross posted this in a SIX different groups.


loudfish a écrit :
On 9 May, 19:24, PST wrote:
hello

Is what somebody can translate this code into vba

thank you


Erm. Unlikely. Requires someone with knowledge of java and vba, who is
willing to reverse engineer your code and replicate in another
language. Hardly a learning experience. Try rentacoder.

And you've cross posted this in a SIX different groups.

LOL.

Andrew


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default java to vba

"loudfish" wrote in message
ups.com...
On 9 May, 19:24, PST wrote:
hello

Is what somebody can translate this code into vba

thank you


Erm. Unlikely. Requires someone with knowledge of java and vba, who is
willing to reverse engineer your code and replicate in another
language. Hardly a learning experience. Try rentacoder.

And you've cross posted this in a SIX different groups.


No he hasn't cross-posted, he's multi-posted.

http://www.cs.tut.fi/~jkorpela/usenet/xpost.html
--
David Biddulph


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default java to vba

On 10 May, 03:00, PST wrote:

and how do you know
And you've cross posted this in a SIX different groups.


You're not likely to get an answer to that one either. For a good
reason. If I tell you, you will then have the ability to disguise your
"multi-posting", and potentially waste people's valuable time
answering your questions twice. Which I can see HAS happened on your
previous posts.

And if you think I'm being harse, the feedback you're getting here
seems to be a bit more positive than the responses you've received
from fr.comp.lang.java

Remember you're relying on goodwill from people to answer your
questions, so think carefully. And maybe read the wikipedia entry on
Netiquette.

Andrew

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dialogue with Java v_verno Excel Worksheet Functions 0 January 8th 06 09:11 PM
Convert excel to java shnim1 Excel Discussion (Misc queries) 0 November 24th 05 10:56 PM
java vitural machine kenneth About this forum 0 October 26th 05 09:46 PM
java script pop ups Jim Excel Worksheet Functions 0 October 21st 05 10:22 PM
java message with VBA Linda Edlund Excel Discussion (Misc queries) 1 June 23rd 05 12:41 PM


All times are GMT +1. The time now is 07:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"