Search found 2069 matches

by MrSwiss
Dec 13, 2017 23:28
Forum: Beginners
Topic: Image. Is possible to add one?
Replies: 8
Views: 157

Re: Image. Is possible to add one?

The simplest way to use multiple file formats (loading, incl. .PNG saving) and,
still staying multi platform, is:
FBImage, from "Libraries" section of forum ... (by D.J.Peters, aka: Joshy)
by MrSwiss
Dec 13, 2017 16:15
Forum: Documentation
Topic: Split CompilerErrMsg, into 2 different pages
Replies: 5
Views: 62

Re: Split CompilerErrMsg, into 2 different pages

jj2007 wrote:That would make it much clearer to the coder without forcing him to switch between windows.
Won't work because, both set's of numbers (Err & Warn) start with: 1
(Btw: there are far less different Warnings, than Errors, in FB)
by MrSwiss
Dec 13, 2017 14:51
Forum: Community Discussion
Topic: FreeBASIC Discussion December 2017
Replies: 18
Views: 927

Re: FreeBASIC Discussion December 2017

Part 1 - Strengths

What hasn't been mentioned so far, but important (IMHO):

FreeBASIC allowes, to write Library's (dynamic or static), independent of:
any other Language(s), aka: native FB code ...
by MrSwiss
Dec 13, 2017 14:07
Forum: Documentation
Topic: Split CompilerErrMsg, into 2 different pages
Replies: 5
Views: 62

Split CompilerErrMsg, into 2 different pages

The current file contains not only ERRORS, but also WARNINGS (IMHO, illogical/unintuitive/hard to find). I therefore propose, to split it, into 2 separate pages: CompilerErrMsg and CompilerWarnMsg. IMHO: Warnings are NOT Errors, because the consequences aren't the same: a Error aborts compilation, w...
by MrSwiss
Dec 12, 2017 19:19
Forum: Beginners
Topic: Image. Is possible to add one?
Replies: 8
Views: 157

Re: Image. Is possible to add one?

Sure, no problem ... (only: if you overwrite the IMG, then clear it, you'll have to:
Put the IMG first again, before new overwrite)
by MrSwiss
Dec 12, 2017 15:41
Forum: General
Topic: methods of accessing bytes by pointer
Replies: 144
Views: 1293

Re: methods of accessing bytes by pointer

fxm wrote:Are you sure (have you tested that?)
If you are referring to the: 'warning', then:
I've had it, without explicitly testing it (using: -exx -w pedantic, aka: debug mode).
And no, I can't remember the code, that caused it.
by MrSwiss
Dec 12, 2017 15:12
Forum: General
Topic: methods of accessing bytes by pointer
Replies: 144
Views: 1293

Re: methods of accessing bytes by pointer

I think the base-reason, behind String/Record passing limit, is a
limitation in the copy constructor, called, by using ByVal ...
by MrSwiss
Dec 12, 2017 14:56
Forum: General
Topic: methods of accessing bytes by pointer
Replies: 144
Views: 1293

Re: methods of accessing bytes by pointer

Yes, you're right: 'ByRef As Const String'. There is a reason, for ByRef and, that is:
on long Strings (passed ByVal) you'll get a compiler WARNING, telling you to use
ByRef passing (instead of ByVal) which is size limited (but not enforced).
by MrSwiss
Dec 12, 2017 14:36
Forum: General
Topic: methods of accessing bytes by pointer
Replies: 144
Views: 1293

Re: methods of accessing bytes by pointer

Yes, the 'original' can't be modified, the copy can be modified (any way you like).

Not because the 'original', being a Const, but because of the 'Const String' passing.
Applies equally, if you are using a String variable (far more important).
by MrSwiss
Dec 12, 2017 12:06
Forum: General
Topic: methods of accessing bytes by pointer
Replies: 144
Views: 1293

Re: methods of accessing bytes by pointer

This would be my code, to show the idea: Const As String ts = "nonsense" Function modify_cstr( ByVal s As Const String ) As String Dim As String cs = s ' assign const str to (local) str cs = Right(cs, 5) ' just for arguments sake Return cs End Function Print "original: "; ts, &qu...
by MrSwiss
Dec 12, 2017 11:35
Forum: General
Topic: methods of accessing bytes by pointer
Replies: 144
Views: 1293

Re: methods of accessing bytes by pointer

@fxm, you don't seem to realize, that your statement (as written) is ambiguous (while it may be technically correct, it is confusing). To me, making a clear distinction between: 'passing' (parameters) and, 'returning' (passing the result of operation). If you re-read your statement in light of this ...
by MrSwiss
Dec 11, 2017 20:47
Forum: General
Topic: methods of accessing bytes by pointer
Replies: 144
Views: 1293

Re: methods of accessing bytes by pointer

In a previous post, MrSwiss proposed to pass a (non-constant) copy of the constant string instead of passing the constant string itself. So the copy could be modified (by error), but without any consequence on the original string. I don't appreciate it, being quoted wrong: I've proposed, to make a ...
by MrSwiss
Dec 10, 2017 16:36
Forum: General
Topic: Range Check (feature request)
Replies: 46
Views: 469

Re: Range Check (feature request)

doubles are faster than integers. Strange! I don't think it's all that strange, because: since the 80486DX version of CPU's, there is an integrated FPU "on board", aka: on the same die, which is employed by FBC (default: 80387 FPU). The 80486DX is actually: 80386/80387 combination, on the...
by MrSwiss
Dec 10, 2017 14:31
Forum: General
Topic: Range Check (feature request)
Replies: 46
Views: 469

Re: Range Check (feature request)

@Munair, just beware of certain problems, a Macro might create (exactly, because of being Interger = implicit). Some Macro's have to: use explicit type-cast's, to work flawlessly (concerns mainly: FBC 32-bit). Also, as stated in my first post: the Function can easily be overloaded (for different dat...
by MrSwiss
Dec 10, 2017 13:52
Forum: General
Topic: Range Check (feature request)
Replies: 46
Views: 469

Re: Range Check (feature request)

@jj2007, don't (ever) use error checking (-e, -ex, -exx) in speed testing code, because: those options add (unwanted) code (err-checks), which slow things down ... If using gcc, with -0 3 option, even Functions are inlined. Thus changing the old rules (call them: the experienced behaviour, fundament...

Go to advanced search