Search found 491 matches

by pestery
May 08, 2013 8:44
Forum: Windows
Topic: Windows File Names?
Replies: 4
Views: 845

Re: Windows File Names?

...so, you found the problem then? I'm guessing your using Windows XP, because on Vista or Win7 the folder path would be C:\Users\[username]\Documents or C:\Users\[username]\Videos or something else if you changed it. Have you thought of using Dir for checking if the folders exist instead of open? T...
by pestery
May 06, 2013 14:59
Forum: Beginners
Topic: Calling a C function inside a DLL from FB
Replies: 10
Views: 1687

Re: Calling a C function inside a DLL from FB

If you have the .a file then you can use #inclib. I think you can also use #inclib if the dll is in the same directory when you compile your program. #Inclib "CalcCircle" Declare Function CalcArea Cdecl Alias "CalcArea" (ByVal r As Const Double) As Double Or you could include the...
by pestery
May 02, 2013 1:12
Forum: Beginners
Topic: INTEGER and LONG Variable Specification
Replies: 18
Views: 1977

Re: INTEGER and LONG Variable Specification

Thanks dkl. Let me know when a 'best practice' is decided and I'll get to work updating at least the the headers that I use (zlib, cryptlib, OpenGL and maybe some others) Edit: Adding a new datatype that matches C's long might be a good way to go, either adding to crt or to FB. It would be useful fo...
by pestery
May 01, 2013 11:22
Forum: Beginners
Topic: INTEGER and LONG Variable Specification
Replies: 18
Views: 1977

Re: INTEGER and LONG Variable Specification

Just a quick question to add to this old topic. When FB 0.25 comes out and Integer and Long have their rolls reversed, will FB's Integer be the same size as C's long , and will FB's Long be the same as C's int ? I just ask in regard to porting libraries to FreeBASIC. There are a few libraries that I...
by pestery
May 01, 2013 8:58
Forum: Projects
Topic: Gray Scott - Reaction Diffusion System Simulation
Replies: 47
Views: 5884

Re: Gray Scott - Reaction Diffusion System Simulation

Just a quick point regarding GCC (on Windows). I stole my version of GCC from the CodeBlocks IDE, which you can get with GCC bundled in the download. Just copy: CodeBlocks\MinGW\bin\gcc.exe -> FreeBASIC\bin\win32 -- Copy file CodeBlocks\MinGW\libexec -> FreeBASIC\bin -- Copy entire folder CodeBlocks...
by pestery
Apr 23, 2013 4:35
Forum: General
Topic: .bas and .bi ?
Replies: 7
Views: 1000

Re: .bas and .bi ?

Just adding to what TJF and Pritchard said. ⋅ You could compile all-as-one by adding this to the top of the mandelbrot.bas file: #Include Once "t_complex.bi" #Include Once "t_complex.bas" Then compile with: fbc mandelbrot.bas ⋅ You could compile all-as-one by ...
by pestery
Apr 19, 2013 1:32
Forum: General
Topic: Unnecessary warnings from GCC
Replies: 4
Views: 1114

Re: Unnecessary warnings from GCC

Cool, another warning removed from GCC. Also I updated the topic title because I mucked it up the first time :P
by pestery
Apr 18, 2013 7:25
Forum: General
Topic: Unnecessary warnings from GCC
Replies: 4
Views: 1114

Unnecessary warnings from GCC

I did a quick search but didn't see any related topics so I thought I'd create this one, for warnings that seem unnecessary that are emitted from GCC when using the GCC back end. Anyway, here's my probably unneeded warning, when using the Field command. My FB code is: Type datatype Field = 1 As Inte...
by pestery
Apr 15, 2013 12:59
Forum: Beginners
Topic: Questions about the language
Replies: 8
Views: 1130

Re: Questions about the language

Welcome to the forum, and FreeBASIC :-) I may be able to answer some of your questions. A1: Yes. FB can do everything C can do and more, but I not quite as much as C++. But its really close. Also FB code is much easier to read than C/C++ code, but that's just my opinion. Also, any library that can b...
by pestery
Apr 14, 2013 8:33
Forum: General
Topic: Using strings in function calls
Replies: 2
Views: 276

Re: Using strings in function calls

Strings just take longer to check than a simple number. I don't know exactly how the internal String operators work, but I imagine that it would check if there was a buffer for the string, how long the string was and what characters it contained. This is much more effort for the computer than just c...
by pestery
Apr 14, 2013 8:03
Forum: Projects
Topic: Gray Scott - Reaction Diffusion System Simulation
Replies: 47
Views: 5884

Re: Gray Scott - Reaction Diffusion System Simulation

Ha, I didn't realise the original post was so old, but I guess it doesn't matter. I thought I would try and get the original example running a bit faster and here is the result. ScreenRes 500,500,32 Randomize Timer ' --- Changes Here --- ' Used an Enum instead of Strings to make it faster Enum aorb_...
by pestery
Apr 01, 2013 3:52
Forum: Beginners
Topic: OGL question 2
Replies: 20
Views: 1977

Re: OGL question 2

I think I've fixed the camera issues. In test.vert change this line. gl_Position = projection * view * model * vec4(position, 1.0); In test.bas I changed a number of lines: ' --- Changes here --- If MultiKey(FB.SC_RIGHT) Then camrot -= 1 If MultiKey(FB.SC_LEFT) Then camrot += 1 If camrot<0 Then camr...
by pestery
Apr 01, 2013 0:44
Forum: Beginners
Topic: binary file writing
Replies: 3
Views: 496

Re: binary file writing

Some quick examples, but check the help file too (as suggested by fxm). Dim As Integer i Put #filenum, position, i Dim As Integer i(1 To 10) Put #filenum, position, i(1), 10 Dim As Integer Ptr i = New Integer[10] Put #filenum, position, i[0], 10 Dim As Integer i(1 To 10) Dim As Any Ptr buffer = @i(1...
by pestery
Mar 30, 2013 13:29
Forum: Beginners
Topic: OGL question 2
Replies: 20
Views: 1977

Re: OGL question 2

alfakilo, your demo didn't work on my computer. The vertex shader failed to compile. You need to have #version [somenumber] at the start of all your shader programs, both vertex and fragment shaders. I added #version 140 to the start of both and then it started working. Not bad although some of the ...
by pestery
Mar 30, 2013 11:13
Forum: Community Discussion
Topic: Where is fbc 0.25?
Replies: 3
Views: 682

Re: Where is fbc 0.25?

fbc 0.25 will be ready when the devs think its ready and not a moment before :P Personally I'm really looking forward to some of the new features like Integer<bitsize> and the beginning of the setup for the jump to 64bit. Although I also know that anything programming related always takes longer tha...

Go to advanced search