Search found 909 matches

by SARG
Nov 13, 2019 8:55
Forum: Tips and Tricks
Topic: Itemmanager
Replies: 3
Views: 208

Re: Itemmanager

Hi,

Just 2 remarks :
- in the "set" function it's useless to set again the name if the item already exists as it's the key to access to the data ....
- probably better, to optimize, to increase the size of the array by 10 or 100 depending the possible number of inputs.
by SARG
Nov 08, 2019 8:11
Forum: Community Discussion
Topic: Program runs twice in Windows 10
Replies: 2
Views: 138

Re: Program runs twice in Windows 10

It could be the antivirus. Mine, Avast, does that. First time the exe is running in a sand box then it runs normally. And after as the exe have been checked it runs one time. There should be a different windows/frame to indicate the treatment by the antivirus. Try (temporary) deactivating the antivi...
by SARG
Nov 06, 2019 10:14
Forum: Community Discussion
Topic: variadic functions and argument lists in fbc
Replies: 25
Views: 7485

Re: variadic functions and argument lists in fbc

@coderjeff From FB manual, ...(ellipsis) : "In the procedure body, Cva_List data type, and Cva_Arg marco can be used to expand the ellipsis parameter (...) to obtain the values of the arguments passed to the variadic procedure. The argument list, once initialized with Cva_Start or copied with C...
by SARG
Nov 05, 2019 9:44
Forum: General
Topic: count of digits in large number
Replies: 5
Views: 191

Re: count of digits in large number

Hi Change log(10(n)) by log (n) Edit : note natural logarithm, divide by log(10) if the need is logarithm of base 10 function countDigit(n As Ulongint) As Integer return INT((log(n)/log(10)) + 1) end function Dim As Integer n input "Enter number: ";n print countDigit(n) sleep
by SARG
Oct 29, 2019 22:27
Forum: General
Topic: Line Input fail
Replies: 12
Views: 299

Re: Line Input fail

Hi Dinosaur,

Don't know if this can help. Just gives the same error, maybe a clue.

Code: Select all

#undef line
sub line(t as long, s as string)
   
end sub
dim as long pf
dim as string chrs
line input #PF,chrs
by SARG
Aug 27, 2019 10:23
Forum: Community Discussion
Topic: FreeBASIC 1.07 Release Discussion
Replies: 42
Views: 6270

FreeBASIC 1.07 Release Discussion

Discussion of FreeBASIC 1.07.x releases, issues, comments, remarks, etc. Full release announcement is posted at Version 1.07.0 released . Original opening post follows. Sorry SARG, this is a good topic to commandeer for the discussion :) -- Jeff ---- Hi coderJeff, Thanks for this new version. The l...
by SARG
Jul 27, 2019 19:05
Forum: General
Topic: No warning if a select case as const value are out of range compiler crash !
Replies: 12
Views: 5077

Re: No warning if a select case as const value are out of range compiler crash !

Hi SARG. Well after a coffee and a scone it still wasn't compiled. I had to go to my other fbide (for 64 bits) with shell "taskkill /F /IM "+ "fbc.exe /T" And put this file into the fb directory. It killed it stone dead, but I won't be re-trying your snippet anytime soon. Hi dod...
by SARG
Jul 27, 2019 17:01
Forum: General
Topic: No warning if a select case as const value are out of range compiler crash !
Replies: 12
Views: 5077

Re: No warning if a select case as const value are out of range compiler crash !

Very funny I tried the code below (fbc 1.06 32bit). Compilation was very long but all works fine. There are more than 2millions lines in the asm file..... Exe size # 8Mo The jump table is very big. I guess limits are not well tested in some cases. dim as integer IT=3000000 const cst1 =1000000 const ...
by SARG
Jul 22, 2019 23:00
Forum: Beginners
Topic: Why wrong length of array
Replies: 8
Views: 4016

Re: Why wrong length of array

If "length of s is:" should show the number of words you need to add one to the ubound as it's zero based..

Code: Select all

print "length of s is: "; ubound(S)+1
by SARG
Jul 22, 2019 9:15
Forum: Documentation
Topic: Hello fxm :-) => for updating the ASM documentation page on wiki
Replies: 15
Views: 6042

Re: Hello fxm :-) => for updating the ASM documentation page on wiki

@D.J.Peters ...I would post later for Linux later. :-( Sorry to be so late. I forgot my reply .... Windows ABI ----------- params : rcx,rdx,r8,r9 + xmm0 to xmm3 Space for these registers also reserved on the stack to store them at the beginning of proc. Important note : if the first arg is an integ...
by SARG
Jun 27, 2019 8:03
Forum: General
Topic: mingw_stdio example
Replies: 13
Views: 2232

Re: mingw_stdio example

@SARG thanks a million for your fine detective work :-) One thanks was enough :-) a take it that if the return type were one of FB's built-in types it would work. Sure I tested this and it works fine. declare function sin2 cdecl alias "sin" (byval c as double) as double dim as double sdou...
by SARG
Jun 26, 2019 20:29
Forum: General
Topic: mingw_stdio example
Replies: 13
Views: 2232

Re: mingw_stdio example

your declarations are very similar to my next to last post, tested ok both 32 and 64 bit Sorry I missed your post and caseih's one. sadly, the same approach won't work for functions like sinl, it works ok in 64-bit but not in 32-bit, apparently, there are some differences between linux cdecl and wi...
by SARG
Jun 25, 2019 21:03
Forum: General
Topic: mingw_stdio example
Replies: 13
Views: 2232

Re: mingw_stdio example

Hi srvaldez, No need naked subs : just use declare with alias, simplier.... 32bit tested but maybe declares should be added for 64 bit. #include "crt/longdouble.bi" declare sub sprint_ cdecl Alias "__mingw_sprintf" (byval s As zstring ptr,byval frmt as zstring ptr,byval c as clon...
by SARG
Jun 25, 2019 10:37
Forum: Projects
Topic: FB debugger : 2.93 32/64 BIT ..... (Sept 5th, 2018)
Replies: 617
Views: 138250

Re: FB debugger : 2.93 32/64 BIT ..... (Sept 5th, 2018)

Hi Charles, Please the probably stupid questions but ... FIRST thank all of you for the the Free Basic language and the Free Basic Debugger !!! There is no stupid question ... You are welcome. Now, my problem - I wrote a small program with many loops that runs (up to some point I don't see and then ...
by SARG
Jun 08, 2019 8:52
Forum: Projects
Topic: Gas64 (no more use of gcc, only gas) :-)
Replies: 56
Views: 17222

Re: Gas64 (no more use of gcc, only gas) :-)

Hi all, New version : http://users.freebasic-portal.de/sarg/fbcgas64.zip Bugs fixed: - adding of 2 array elements (frisian) - crash when using naked procedures (cadd csub). In this case parameter names are not filled so issue to use them... (srvaldez) - and some other ones Changed: - optimizations f...

Go to advanced search