Search found 1165 matches

by stylin
May 06, 2011 12:35
Forum: Beginners
Topic: TYPE, and redim array in them
Replies: 15
Views: 5409

Yeah, or perhaps, 'Create 10 rows of integer pointers var myMemArray = new integer ptr[10] 'Add 10 columns of integers to each row for i as integer = 0 to 9 myMemArray[i] = new integer[10] next 'Add some data to the memory segment for i as integer = 0 to 9 for j as integer = 0 to 9 myMemArray[i][j] ...
by stylin
May 06, 2011 12:10
Forum: Beginners
Topic: TYPE, and redim array in them
Replies: 15
Views: 5409

Hi badidea, it can be a bit confusing. At the moment an array member acts like a fixed-length string member (as opposed to a variable-length string member), its elements are stored as part of the object and contribute to its size (so resizing wouldn't make sense even if it did somehow "work&quo...
by stylin
May 06, 2011 11:44
Forum: Community Discussion
Topic: A Light Discussion
Replies: 23
Views: 3797

kiyotewolf, I'm so sorry to hear of your loss, I wish you the best of luck.
by stylin
May 06, 2011 4:19
Forum: Sources, Examples, Tips and Tricks
Topic: Inheritance via Pointers
Replies: 23
Views: 5001

Hi, all. Thanks rdc and everyone else for the excellent tips and tricks. If anyone is interested in seeing how polymorphism can be achieved, this old thread demos some FB code linking directly to C++ code and using a pair of objects polymorphically by replicating g++'s virtual table (have fun !): ht...
by stylin
May 06, 2011 0:36
Forum: Beginners
Topic: Can FB create arrays of constant values? [YES]
Replies: 7
Views: 1956

elsairon, the commented code is fine. The problem is FreeBASIC has two meanings of "constant": one is the enum-like compile-time constant declared using CONST, and the other refers to a variable -- or in your case, an array -- where the datatype itself is said to be constant. Your commente...
by stylin
May 05, 2011 23:17
Forum: Beginners
Topic: How does type checking work for enums in FB?
Replies: 15
Views: 2395

elsairon, if you are wanting a check to see if a value is within a lower and upper bound, you could add two additional enums that specify the first and last values, and create a function or macro that would compare the value to those two values. This is tedious as at least one of those enums needs t...
by stylin
May 05, 2011 12:53
Forum: Beginners
Topic: How does type checking work for enums in FB?
Replies: 15
Views: 2395

An ENUM needs a type to get passed to a parameter list (or to be used in an OPERATOR OVERLOAD). Since the type of an ENUM is INTEGER, it has the known INTEGER range from -2^31 to 2^31-1. Some (I imagine marcov being one) would say this is just an implementation detail, and is of concern only to tho...
by stylin
May 05, 2011 11:01
Forum: Beginners
Topic: How does type checking work for enums in FB?
Replies: 15
Views: 2395

- why can I assign an OUT OF BOUNDS integer value to an enum type? So despite it being an integer internally, that is not an excuse to not enforce the bounds of the enum type. I think the problem there lies in the fact that enums are often used for bit flag values (integers that are powers of two) ...
by stylin
May 04, 2011 13:23
Forum: Beginners
Topic: Things noted about QB compatibility
Replies: 17
Views: 3770

Excellent, thanks for the clarification, fxm.
by stylin
May 04, 2011 11:54
Forum: Beginners
Topic: Things noted about QB compatibility
Replies: 17
Views: 3770

If I understand the situation correctly, SCREEN shouldn't need the prefix under #lang qb" (it's a QB function), so this looks like a bug ? By the way, also like QB, procedure definitions are declarations as well, so you could write, #lang "qb" sub add( a, b, c ) print a + b + c end su...
by stylin
May 03, 2011 17:44
Forum: Community Discussion
Topic: Looking for former QBasic people to visit the qb64.net site.
Replies: 64
Views: 13364

I find it difficult to see QB64 being more beginner-friendly than FreeBASIC, as it exists and is designed primarily to run legacy QB code out of the box. This has forced some odd-looking code, like prefixing QB64-specific keywords with an underscore (what do beginners know or care about QB ?). Would...
by stylin
Apr 02, 2011 18:01
Forum: Documentation
Topic: The FreeBASIC\Examples Directory in the Manual
Replies: 15
Views: 82921

I can see your point about navigation links, and how users could get lost from time to time. I believe something like that can be done by a site admin: http://docs.wikkawiki.org/WikkaMenus#hn_Legacy_navigation_links_Wikka_1.1.X I don't know how flexible our old wiki software is. A few years ago code...
by stylin
Apr 02, 2011 5:42
Forum: Documentation
Topic: The FreeBASIC\Examples Directory in the Manual
Replies: 15
Views: 82921

Heh, well, I can't explain why someone would completely ignore the entire right side of the table of contents page time and time again, but I know very little about psychology (next to nothing, actually). You seem to have some ideas how the wiki could be improved. What would be most helpful is to li...
by stylin
Apr 01, 2011 19:23
Forum: Community Discussion
Topic: New fbc branch ('inheritance') on sourceforge (fbc SVN)
Replies: 133
Views: 41519

Great news, v1ctor. Keep up the excellent work !
by stylin
Apr 01, 2011 19:03
Forum: Community Discussion
Topic: whats screwing everything up in the FreeBASIC universe ?
Replies: 18
Views: 4826

Hi, TESLACOIL. Just took a look at your site. Looks fine to me, good luck with it. I do have to say, however, that the FreeBASIC Wiki we have does support many of the ideas you are trying to implement with your site. At the very least, things like FB & QB differences, FAQs and programming tips a...