Search found 1723 matches

by notthecheatr
Oct 01, 2008 17:34
Forum: Community Discussion
Topic: Harbor City School Intro to Programming Class
Replies: 24
Views: 5461

Welcome to programming! I think you'll enjoy it, once you get the hang of it, because it can be a lot of fun and also very rewarding. It will help you be able to solve computer problems other people can't, and in general you should know more about how the computer works internally. You'll be an all-...
by notthecheatr
Oct 01, 2008 17:24
Forum: General
Topic: Len of udt element
Replies: 12
Views: 1646

Let's have a look at this code in context a bit... at least show us the Type...End Type for EthControl. We need to know what data types we're dealing with here, etc. It seems obvious, but there might be some nuance in the code we're missing.
by notthecheatr
Oct 01, 2008 17:16
Forum: Community Discussion
Topic: My thoughts about FreeBasic and "Object Oriented code&a
Replies: 35
Views: 8874

OOP with OPTION IMPLICIT: Otherwise known as Magic. State of the art programming (hmm, FreeBASIC is now a ninth-generation programming language, meaning it reads your mind and figures out exactly what you want. Rah for FreeBASIC.) /' someObject is an object of the type someClass ' neither is actual...
by notthecheatr
Sep 30, 2008 22:46
Forum: Community Discussion
Topic: My thoughts about FreeBasic and "Object Oriented code&a
Replies: 35
Views: 8874

Ok, since Lachie doesn't look the word "should" I'll say "won't." OOP is an optional feature, just like a C program (which has no OOP at all) can compile in a C++ compiler in most cases with little or no modification at all. The differences are good things, and they're meant to be used, but if you d...
by notthecheatr
Sep 30, 2008 21:46
Forum: Community Discussion
Topic: My thoughts about FreeBasic and "Object Oriented code&a
Replies: 35
Views: 8874

Though I'm not a developer, I think it's pretty safe to say this (I'm simply repeating what I said in my above post): Adding OOP to FreeBASIC shouldn't actually change a lot (programs written in the normal non-OOP paradigm should still be compilable, although slight syntax changes might require slig...
by notthecheatr
Sep 30, 2008 21:39
Forum: Community Discussion
Topic: My thoughts about FreeBasic and "Object Oriented code&a
Replies: 35
Views: 8874

Actually, nobody is planning to wrap those things in an object, merely to put them inside a namespace. That means they can still be used (and in a -lang qb mode the "Using FB" would be implicit) but they can be accessed from inside the namespace in case a person would prefer to name their variables ...
by notthecheatr
Sep 29, 2008 23:16
Forum: Community Discussion
Topic: My thoughts about FreeBasic and "Object Oriented code&a
Replies: 35
Views: 8874

I only use OO in larger programs where I need the interface to be properly formed. My little programs that I throw together in two minutes as proof of concept or to solve a simple problem, I never use OO. Which is why even though I love C++ I'll never use it for my little programs. FreeBASIC is so m...
by notthecheatr
Sep 29, 2008 17:02
Forum: Beginners
Topic: Integer to String ?
Replies: 11
Views: 2414

R0b0t1, that only works for a single-digit integer number. If you need a multi-digit number, a signed number, or anything else, it won't work. Preferable I think to use Str() ;-)

Code: Select all

Dim As Integer someInt = 23
Dim As String someStr

someStr = Str(someInt)
by notthecheatr
Sep 26, 2008 22:37
Forum: General
Topic: THIS support in WITH blocks
Replies: 15
Views: 2141

I constantly use that as a variable name. sub Foo.bas( byref that as Foo ) this.x = that.x end sub You'd break nearly all of my code. And notthecheatr, that doesn't solve our problem. I'm not sure what you were getting at. If we're going to change syntax to support with as varname, we might...
by notthecheatr
Sep 26, 2008 20:17
Forum: General
Topic: THIS support in WITH blocks
Replies: 15
Views: 2141

Re: THIS support in WITH blocks

Hmm. Why not, just for fun, make a that keyword? with myVar that = value 'that refers to myVar end with with myArray(a,b,c) that=value 'that refers to myArray(a,b,c) end with It shouldn't conflict with anything (hopefully nobody uses that as a variable name), it fits right in with th...
by notthecheatr
Sep 24, 2008 21:42
Forum: General
Topic: CONSTant in local scope problems
Replies: 13
Views: 1577

notthecheatr, if you're uncomfortable with module-level Consts getting a global scope, the simple solution for that is just to use an explicit Main function, and stick all your local consts in there. I may do that, if I ever have such a problem - so far I haven't had any such problem though. Nice s...
by notthecheatr
Sep 24, 2008 20:33
Forum: General
Topic: CONSTant in local scope problems
Replies: 13
Views: 1577

I'm not sure what you're saying the problem is with Const. But Consts used at module level do have a global scope. I figured it might be the case that it's *supposed to be* that way. Nevertheless I find it rather odd/abnormal, since if you declared a variable the same way and in the same place, it ...
by notthecheatr
Sep 24, 2008 19:00
Forum: General
Topic: CONSTant in local scope problems
Replies: 13
Views: 1577

Const keeps proper track of scoping. Const can only be used in the scope it belongs to, which is good (if you don't think this is good, think of all the reasons we have scope in the first place and you'll see that I'm right). Const keeps proper track of variable types (even if you don't explicitly ...
by notthecheatr
Sep 23, 2008 21:22
Forum: Beginners
Topic: They anyway to overload a function?
Replies: 1
Views: 716

Indeed there is. There is one catch though: you can't overload based on the return value type, you can only overload based on the parameter types. Here's the example from the manual: Declare Function SUM Overload (A As Integer,B As Integer) As Integer Declare Function SUM Overload (A As ...
by notthecheatr
Sep 23, 2008 17:20
Forum: Projects
Topic: Real seconds into game seconds
Replies: 11
Views: 2247

jevans4949 has a good point, and in fact it is also even possible to do the following: Print RealTime; Print " seconds real time (Game shows "; Print GameSecs; Print " seconds)" Although it's uglier that way. I still think semi-colon is a hack, since it isn't part of trad...

Go to advanced search