Search found 9004 matches

by fxm
Jul 23, 2019 18:53
Forum: Documentation
Topic: Is the docu about variadic argument in #define or #macro complete ?
Replies: 5
Views: 102

Re: Is the docu about variadic argument in #define or #macro complete ?

See above my new proposal for updating the documentation, and here my last example updated.
by fxm
Jul 23, 2019 15:31
Forum: Beginners
Topic: How to include arrays in type/class
Replies: 6
Views: 83

Re: How to include arrays in type/class

Anyway, Swap does not work with arrays but only with array elements. But otherwise we can do that: type rndict public: prognames(Any) as string prognums(Any) as integer end type dim as rndict rndict1, rndict2 redim rndict1.prognums(1) redim rndict2.prognames(2) swap rndict1, rndict2
by fxm
Jul 23, 2019 15:10
Forum: Documentation
Topic: Is the docu about variadic argument in #define or #macro complete ?
Replies: 5
Views: 102

Re: Is the docu about variadic argument in #define or #macro complete ?

@fxm this is clear in your example arg1 and arg2 have names to compare with something but if you call your example test(5, 6, 7, 8) In this case: arg1 = 5 arg2 = 6, 7, 8 The different sub-arguments of arg2 can be discriminated by means of the comma used as separator. Example: #macro test2(arg1, arg...
by fxm
Jul 23, 2019 8:16
Forum: Documentation
Topic: Is the docu about variadic argument in #define or #macro complete ?
Replies: 5
Views: 102

Re: Is the docu about variadic argument in #define or #macro complete ?

Maybe: #macro test(arg1, arg2...) Print arg1 #if #arg2 = "" Print "argument not passed" #else Print arg2 #endif #endmacro test("1", "2") Print test("3") Print test(5, 6) Print test(7) Sleep Proposed update of the ... (Ellipsis) documentation ...
by fxm
Jul 23, 2019 5:42
Forum: Beginners
Topic: Why wrong length of array
Replies: 8
Views: 134

Re: Why wrong length of array

For an array 'S() ', 'S' is not an element but the symbol-name of the array. In that case, 'Len(S)' is interpreted as 'Len(Typeof(S))' . If 'S()' is a String array, 'Len(String)' returns the length in Byte of...
by fxm
Jul 23, 2019 5:14
Forum: Beginners
Topic: Why filenames are not being printed from a loop
Replies: 3
Views: 86

Re: Why filenames are not being printed from a loop

Used 'Preserve' with 'ReDim' to preserve contents will resizing an array:
redim preserve allfiles(count+1)
by fxm
Jul 22, 2019 18:20
Forum: Documentation
Topic: Wiki improvements
Replies: 338
Views: 26421

Re: Wiki improvements

'Recursion' page filled in the Programmer's Guide On my return from vacation (and with a much better internet connection), I will trying to plan to write 2 more pages of the Programmer's Guide: - New and Delete (in User Defined Types) - Passing Arrays to Procedures (in Variables and Datatypes / Arr...
by fxm
Jul 22, 2019 9:34
Forum: General
Topic: Forum search
Replies: 1
Views: 71

Re: Forum search

I have also noticed for some time, for example there is no longer search within code blocks.
by fxm
Jul 22, 2019 5:25
Forum: General
Topic: Remove elements repeted
Replies: 25
Views: 1015

Re: Remove elements repeted

The last array element must not be tested with the next, otherwise error: "out of bounds array access". Perhaps: 'show the original array, without the repeated elements......................... PRINT:PRINT:PRINT "show the original array, without the repeated elements" FOR n = 0 T...
by fxm
Jul 21, 2019 6:20
Forum: Documentation
Topic: Wiki improvements
Replies: 338
Views: 26421

Re: Wiki improvements

'Recursion' page filled in the Programmer's Guide:
- ProPgRecursion → fxm [new page created]
- CatPgProgrammer → fxm [added link to "Recursion" page]
- PrintToc → fxm [added link to "Recursion" page]
by fxm
Jul 20, 2019 7:08
Forum: General
Topic: #error error? solved
Replies: 19
Views: 261

Re: #error error?

Thank you.
KeyPgPperror → fxm [reworded "Description" paragraph]
by fxm
Jul 17, 2019 13:15
Forum: Beginners
Topic: Recommended settings for FBIde users
Replies: 23
Views: 14828

Re: Recommended settings for FBIde users

Welcome to the forum! Have you unblock this CHM file after downloading? (by right clicking the file in your file explorer, selecting 'properties', and clicking the 'unblock' button at the bottom) Note: The last official FB version is here: Version 1.06.0 released (see FB-manual-1.06.0-chm in 'Docume...
by fxm
Jul 17, 2019 7:55
Forum: Tips and Tricks
Topic: Quick Procedure for Copying Array of Simple DataType into a Dynamic Array
Replies: 14
Views: 1202

Re: Quick Procedure for Copying Array of Simple DataType into a Dynamic Array

In relation with the above code, a macro to determine if a type instance must be copied with a "deep" copy method or if a "shallow" copy method is sufficient: #macro typeCopyMethod(typesymbol, typeCopyMethodResult) '' Determine if the type instances can be copied with a "sha...
by fxm
Jul 17, 2019 5:10
Forum: General
Topic: Squares
Replies: 6745
Views: 384502

Re: Squares

For example: Const As Integer maxindex = 720 Const As Integer period = 60 Dim As Integer index = (Timer / period) Mod maxindex + 1 Do Dim As Integer i = (Timer / period) Mod maxindex + 1 If i <> index Then index = i Print index '' or play the #index element, with index in [1, maxindex] End If Sleep ...
by fxm
Jul 15, 2019 20:27
Forum: Community Discussion
Topic: New array features
Replies: 106
Views: 5235

Re: New array features

But ... what does an added feature teach a newbie when it is added "in a twisted way"? Is the message to be: obfuscation and code tricks are a good practice? Or - go away, you aren't ready for this? Maybe I did not express myself well, but on the contrary I wanted to say that it is better...

Go to advanced search