Search found 58 matches

by mike74
Tue Mar 04, 2008 7:27 pm
Forum: Mac OSX
Topic: Get location of original item from alias
Replies: 0
Views: 1818

Get location of original item from alias

Anyone know of a way to get the location of the original item that an alias points to?
by mike74
Mon Sep 17, 2007 7:44 pm
Forum: Announcement
Topic: PureBasic 4.00 Beta 1 for MacOS X
Replies: 20
Views: 9828

freak: I'm not sure what you meant by "poor response." Do you mean that you decided that interest is low based on downloads, forum posts, emails, etc.? If so, perhaps you are underestimating interest. Maybe some people don't even want to download a non-x86 version, or a version that does not create ...
by mike74
Fri Jul 20, 2007 2:49 am
Forum: Coding Questions
Topic: Huge #'s
Replies: 81
Views: 39413

Rather than continue to post new versions here, I've posted my version to a wikispaces page. I'll still report significant updates here, if there are any. Also, the page has an RSS feed. The page is at http://mike74swiki.wikispaces.com/Big+Multiply and the RSS feed is http://mike74swiki.wikispaces ...
by mike74
Thu Jul 19, 2007 9:16 pm
Forum: Coding Questions
Topic: Huge #'s
Replies: 81
Views: 39413

Another variation of Demivec's code:

Procedure.s MultiplyBig(factor_1$,factor_2$) ;returns Prod$ as factor_1$*factor_2$, factors can have leading zeroes and be negative

Protected n.l,len_factor_1.l,len_factor_2.l,len_diff.l

len_factor_1 = Len(factor_1$)
len_factor_2 = Len(factor_2$)
If len ...
by mike74
Thu Jul 19, 2007 5:58 pm
Forum: Coding Questions
Topic: Huge #'s
Replies: 81
Views: 39413

I don't know how it works with *s = t, but you're right as far as CopyMemory goes -- you need to make sure that the memory area being copied to is big enough (or use MoveMemory, which is supposedly slower). The PB Help file has some info.
by mike74
Thu Jul 19, 2007 5:34 pm
Forum: Coding Questions
Topic: Huge #'s
Replies: 81
Views: 39413

Actual answer: I don't know... :lol: I would think not, but I really don't know.

Did you initialize your Zahl3 variable with a value like PDwyer suggested?
by mike74
Thu Jul 19, 2007 5:19 pm
Forum: Coding Questions
Topic: Huge #'s
Replies: 81
Views: 39413

Michael,

I just realized I had made another change... :oops: Take the ".s" off the *s.s in the procedure. Sorry!
by mike74
Thu Jul 19, 2007 4:57 pm
Forum: Coding Questions
Topic: Huge #'s
Replies: 81
Views: 39413

I'm using the PB 4.0 Beta for Mac. Maybe there are one or more bugs involved. Be careful not to write to any random memory address! You can mess up your computer big time!
by mike74
Thu Jul 19, 2007 4:25 pm
Forum: Coding Questions
Topic: Huge #'s
Replies: 81
Views: 39413

Michael,

Your GetNumber works if you replace

*s=t

with

CopyMemory(@t, *s, Len(t))
by mike74
Thu Jul 19, 2007 2:42 pm
Forum: Coding Questions
Topic: Huge #'s
Replies: 81
Views: 39413

If you put a "Debug *s" in the procedure you get the right string. I don't why its address isn't the same as the address of zahl3.
by mike74
Wed Jul 18, 2007 1:32 am
Forum: Coding Questions
Topic: Huge #'s
Replies: 81
Views: 39413

Maybe this is better...

Procedure.s MultiplyBig(factor_1$,factor_2$) ;returns Prod$ as factor_1$*factor_2$, factors can have leading zeroes and be negative

Protected n.l,len_factor_1.l,len_factor_2.l

len_factor_1=Len(factor_1$)
len_factor_2=Len(factor_2$)
If len_factor_2>len_factor_1 ;make ...
by mike74
Wed Jul 18, 2007 1:14 am
Forum: Coding Questions
Topic: Huge #'s
Replies: 81
Views: 39413

I just realized that taking out the second loop that I did is likely to reduce performance -- it probably would have usually found the first non-zero number very quickly.
by mike74
Wed Jul 18, 2007 1:06 am
Forum: Coding Questions
Topic: Huge #'s
Replies: 81
Views: 39413

Took a couple of loops out of Demivec's code:

Edit: Code removed. See next two messages I posted.
by mike74
Thu Jul 12, 2007 11:22 pm
Forum: General Discussion
Topic: Project Euler...
Replies: 182
Views: 69806

Michael,

That was my understanding of what your code was doing although I did find it difficult to understand exactly how it was doing it. When I looked at the way it was factorizing I realized that it was doing some redundant evaluations. For example, it factors 16 as both 2x8 and 8x2. I would ...
by mike74
Thu Jul 12, 2007 10:35 pm
Forum: General Discussion
Topic: Project Euler...
Replies: 182
Views: 69806

I think I answered my question!

Global total = 0
Global Dim iterdepth.l(50)
Procedure.s getuniquefactors(g.l, lastfactor.l, x.s)

i = lastfactor
resstring.s = ""
While i*i<=g
If g%i = 0
iterdepth(i) + 1
x = x + "-" + Str(i)
Debug x + "-" + Str(g/i)
resstring = Str(g/i ...