Search found 5121 matches

by dodicat
Oct 17, 2018 10:02
Forum: Community Discussion
Topic: [offtopic] FreePascal
Replies: 44
Views: 798

Re: [offtopic] FreePascal

Indeed I did test with a very old freepascal because that was all I had. I also tested with virtual pascal, which actually was quite fast (15 seconds). (Virtual pascal has been dead since 2005) But I now have freepascal 64 bit version 3.0.4 thanks to srvaldez.(10 seconds) Anyway, I am a little disap...
by dodicat
Oct 15, 2018 20:37
Forum: Game Dev
Topic: Retro style 3D graphics
Replies: 6
Views: 302

Re: Retro style 3D graphics

You have W,H as single, but you integer divide
Should be
H = (pointY1-240)*2
W = H/9
H = H/9
I reckon.
by dodicat
Oct 15, 2018 18:30
Forum: Community Discussion
Topic: [offtopic] FreePascal
Replies: 44
Views: 798

Re: [offtopic] FreePascal

Fair enough marcov.
But I still think that you should have a portable(zip, 7Z,whatever) version of FreePascal.
Other compilers have, Dev-C++, FreeBASIC of course, Haskell, ...
You might attract more punters (sorry ... developers).
by dodicat
Oct 15, 2018 18:03
Forum: Community Discussion
Topic: [offtopic] FreePascal
Replies: 44
Views: 798

Re: [offtopic] FreePascal

Thank you marcov. svarldez's zip fpc works well here. Windows: I note that If I had used the installer and agreed to put fpc.exe on path then I would also have put a 67 KB gcc.exe on path, along with a multitude of other executable files. What then If I decide to download MinGW and have a gcc proper...
by dodicat
Oct 15, 2018 15:01
Forum: General
Topic: Fast random integers
Replies: 11
Views: 237

Re: Fast random integers

Suppose you select a random number from the range 0 to 10 Do this 20000000 and keep the counts in an array(0 to 10) array(0), array(1) ... should all be the same. Of course they are not in practice. Here are some observations about the array() from randomize 1 to randomize 4 (randomize 5 is too slow...
by dodicat
Oct 14, 2018 21:42
Forum: Community Discussion
Topic: Line Input #n produces nullpointers
Replies: 10
Views: 163

Re: Line Input #n produces nullpointers

KeyPgOpStrptr is explicit about this possibility: In case of empty string (only for variable length strings), Operator Strptr returns a null pointer. Good. Maybe it should also be added to the help file, which n00bs are more likely to find and consult. So you should replace this end character at ea...
by dodicat
Oct 14, 2018 21:35
Forum: Community Discussion
Topic: [offtopic] FreePascal
Replies: 44
Views: 798

Re: [offtopic] FreePascal

OK srvaldez.
I have your file.

-0.169075164
-0.169059907
10.42882303687671 seconds

I'll fix up my dev-pascal ide to use it.
Thanks again.
by dodicat
Oct 14, 2018 21:12
Forum: Community Discussion
Topic: [offtopic] FreePascal
Replies: 44
Views: 798

Re: [offtopic] FreePascal

Thanks srvaldez.
I'll try that later.
The pascal code runs well on virtual pascal, with only two minor adjustments.
I copied the vp21 folder directly from my xP machine to Win 10.

I get about 15 seconds in virtual pascal.
by dodicat
Oct 14, 2018 18:57
Forum: Community Discussion
Topic: [offtopic] FreePascal
Replies: 44
Views: 798

Re: [offtopic] FreePascal

I get about 10 seconds with -gen gcc -Wc -O3 I get about the same with srvaldez's c code compiling directly with gcc (obviously, it's the same thing) I get about 34 seconds with my freepascal compiler (selecting BEST speed in the ide which is O3 in the compile log) But my freepascal is old(I copied ...
by dodicat
Oct 14, 2018 14:57
Forum: Community Discussion
Topic: [offtopic] FreePascal
Replies: 44
Views: 798

Re: [offtopic] FreePascal

running the actual pascal code in freepascal via

Code: Select all

dim as double t=timer
shell "test1 50000000"
print timer-t
sleep 


I get

Code: Select all

-0.169075164
-0.169059907
 34.78720054423098
 


so I have -gen gas beating freepascal (using somenumber^2 )
by dodicat
Oct 14, 2018 14:21
Forum: Community Discussion
Topic: [offtopic] FreePascal
Replies: 44
Views: 798

Re: [offtopic] FreePascal

srvaldez for pascal sqr did you use Somenumber*somenumber or somenumber^2 ? Here is my translation Type body ' Body = record As String body Dim As Double x, y, z, _ vx, vy, vz,mass End Type Const pi = 3.141592653589793 Const solarMass = 4 * (pi)^2 Const daysPerYear = 365.24 'type Dim shared As body ...
by dodicat
Oct 14, 2018 12:49
Forum: Community Discussion
Topic: Line Input #n produces nullpointers
Replies: 10
Views: 163

Re: Line Input #n produces nullpointers

HELP FILE; Reads a line from an open text file (opened for Input through a bound file number) and stores it in a string variable. A line of text ends at, but does not include the end of line characters. An end of line character may be the LF character (Chr(10)) or the CRLF character pair (Chr(13,10)...
by dodicat
Oct 13, 2018 19:20
Forum: General
Topic: Can I prevent pointer use in this case?
Replies: 11
Views: 260

Re: Can I prevent pointer use in this case?

Dim shared is not required. You could make everything very private. namespace Control dim as integer number(999) function dumb(k as integer) as integer function= number(k) end function end namespace type A_type as function(as integer) as integer number= @control.dumb end type var A=A_type Control.nu...
by dodicat
Oct 13, 2018 17:22
Forum: Linux
Topic: Profiling Error
Replies: 2
Views: 278

Re: Profiling Error

No problem here (Scientific Linux) Which is pretty much Red Hat Linux. [dodicat@localhost basic]$ fbc -v -profile worm.bas FreeBASIC Compiler - Version 1.05.0 (01-31-2016), built for linux-x86 (32bit) Copyright (C) 2004-2016 The FreeBASIC development team. target: linux-x86, 486, 32bit compiling: wo...
by dodicat
Oct 13, 2018 13:21
Forum: General
Topic: Can I prevent pointer use in this case?
Replies: 11
Views: 260

Re: Can I prevent pointer use in this case?

I get an error fxm Compiler output: Aborting due to runtime error 12 ("segmentation violation" signal) A simplification for a control array. dim shared as integer number(999) function dumb(k as integer) as integer function= number(k) end function type A_type as function(as integer) as inte...

Go to advanced search