Search found 2894 matches

by Tourist Trap
Jun 09, 2015 14:16
Forum: Community Discussion
Topic: Dim/Data block syntax
Replies: 4
Views: 780

Dim/Data block syntax

Hi, As far as I've been able to see, there are 2 ways to declare a variable ( leave aside Redim , or additionnal keywords like Shared , or variable/type versus type/variable order ) . Those are : Dim As SomeType someVariable , or As SomeType someVariable , only for fields sitting inside UserDefined ...
by Tourist Trap
Jun 08, 2015 21:23
Forum: General
Topic: Squares
Replies: 8041
Views: 507492

Re: Squares

Not quite sure what you mean tourist trap, on the first time through the loop both anyptr's are set to the same value and the loop exits. if you do this, it shows the object is in the same memory location each time Thanks for noticing. But it is how it is intended to be since it is proof ad absurdu...
by Tourist Trap
Jun 08, 2015 20:44
Forum: General
Topic: Squares
Replies: 8041
Views: 507492

Re:

Since this is a silly thread... here's a silly question, motivated by the code from Dodicat. Look at the macro labeled background. Is there a performance penalty for using DIM within a loop, as compared to defining the var before the loop? Not always the same place in memory will be used to store t...
by Tourist Trap
Jun 08, 2015 16:02
Forum: Community Discussion
Topic: More strict Cast/Cptr behaviour?
Replies: 44
Views: 5625

Re: More strict Cast/Cptr behaviour?

MOD wrote:I really don't like the idea of breaking code, especially if it's the casting operator (which is for sure used a lot in bigger projects).

I'd suggest better have new keywords than breaking the old ones.


CType() for instance?
by Tourist Trap
Jun 08, 2015 14:44
Forum: Community Discussion
Topic: Dim Byref syntax
Replies: 134
Views: 17174

Re: Dim Byref syntax

What do you think about the syntax? I like it because it matches the syntax for Byref parameters, and Byref function results, and it doesn't require a new keyword... A possible alternative that I saw suggested on this forum a while ago, by adding the Ref keyword: I would make a remark, even not as ...
by Tourist Trap
Jun 08, 2015 13:51
Forum: Tips and Tricks
Topic: Time Ellapsed Displayer UDT and function
Replies: 8
Views: 1353

Re: Time Ellapsed Displayer UDT and function

The simplest way of stopwatching would surely be this: Dim As Double timeRemind = Timer '... 'Do the things you want to measure '... Print Timer - timeRemind Quite true, but I'm under influence of reusability paradigm and as far as I can, I make efforts to bundle things together . Here above I woul...
by Tourist Trap
Jun 07, 2015 22:05
Forum: General
Topic: Really annoying pixel problem
Replies: 10
Views: 1135

Re: Really annoying pixel problem

Meaning maybe something like : PutPixel(X,Y) GetPixel(X,Y) rather than Point ? ... As a matter of test, tis following works fine for me : Screen 18 Circle (0,100), 100, 99 Dim As Double x,y,z z= Point(100,100) ? "z=";z Sleep ''Returns z=99 as excepted This also worked , ev...
by Tourist Trap
Jun 07, 2015 15:26
Forum: Tips and Tricks
Topic: Time Ellapsed Displayer UDT and function
Replies: 8
Views: 1353

Re: Time Ellapsed Displayer UDT and function

Good heavens, why are you doing it that complicated? Hi grindstone. Nice piece of code again! To answer you, I had no idea that static could serve in a function. In fact I've met first the case where static was put into a UDT. Some time ago I remember having failed to use shared to build global var...
by Tourist Trap
Jun 07, 2015 14:32
Forum: Documentation
Topic: Documenting Syntax
Replies: 7
Views: 3430

Re: Documenting Syntax

(...) The best (IMHO) should be that in the documentation: - only list of the different supported syntaxes, without keyword "Overload", - but an ordered list representing the compiler choice priority. This also is very true. Too much condensed syntax is most often unreadable. 1 / NAME old...
by Tourist Trap
Jun 07, 2015 12:29
Forum: Tips and Tricks
Topic: Time Ellapsed Displayer UDT and function
Replies: 8
Views: 1353

Time Ellapsed Displayer UDT and function

Hi, The idea (quite a classic) is to get a function that show ellapsed time between its last call and displays it (in a packed and versatile maneer). Calling it "PutTimeStone()" it behaves like below : 'Do something ... TimeStone() ''<----- Shows ellapsed time since last call, here 0 'Do s...
by Tourist Trap
Jun 06, 2015 21:05
Forum: Documentation
Topic: Operator Cast missing from the index
Replies: 21
Views: 3036

Re: Operator Cast missing from the index

"Cast()" is the only procedure/operator which can be overloaded to return different datatypes: Code I think that from this, there is a workaround. I'm not 100% sure because something did'nt work in the code below [ EDIT: Fixed, it was use of val() when I needed asc()]. I've used cast abil...
by Tourist Trap
Jun 06, 2015 16:31
Forum: Documentation
Topic: Operator Cast missing from the index
Replies: 21
Views: 3036

Re: Operator Cast missing from the index

Ok! I've just been looking at the wiki index page. It is very different from what I've got when running CHM file. Funny thing is that what I was asking for about libs is actually implemented online. I knew I had seen that already. But if you take at look at chm file version, it's quite different and...
by Tourist Trap
Jun 06, 2015 16:15
Forum: Documentation
Topic: Operator Cast missing from the index
Replies: 21
Views: 3036

Re: Operator Cast missing from the index

Hi Dlk, thanks, would be kind.

As I said I can't generally use online wiki. Is there a big difference between online help and the file downloadable as .chm ? Or is it generated from it often enough, and should I be confident on it for being mostly up to date? I mean for current version of compiler.
by Tourist Trap
Jun 06, 2015 15:40
Forum: Documentation
Topic: Operator Cast missing from the index
Replies: 21
Views: 3036

Re: Operator Cast missing from the index

I use offline chm help file since I've got erratic network. Anyway the Wiki is very much readable from what I can see. Whatever I dont deny that I was finally able to find Cast() somewhere in the docs. However as most of non plain-text english readers, and even english ones, I rely mostly on the ind...
by Tourist Trap
Jun 06, 2015 10:17
Forum: Documentation
Topic: Operator Cast missing from the index
Replies: 21
Views: 3036

Operator Cast missing from the index

Hi, I'm probably under influence of vb.net because I will make some remarks that matter for passing vb code to fb. But that's also general remarks that applies from a pure FB point of view. For now it will be about conversion utility. I've met 2 difficulties. The two are related with documentation b...

Go to advanced search