Re: [Ohrrpgce] [Bug 396] Can the OHR be compiled in FreeBasic 0.17?

2007-06-25 Thread Keith Gable
On 6/22/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:

 Go pick on the Ubersetzung and Gentoo bugreports!


:(

Now that my computer is back up and running it would probably be a
good idea to close some of those bugs out by finishing them :)


As far as FB0.17 looks, it seems to me like they're trying to be more
like Visual Basic than QuickBASIC. I can see the OHR eventually
working in 0.17 though. And as far as GOSUB goes, wouldn't it work to
change everything to functions (even if they don't return anything
useful ... perhaps return 0 on success and !=0 on failure) and CALL
them? I haven't touched QB in like 5 years so I don't remember if
that's valid syntax, but in VB it would be...

Public Function DoSomething(Arg1 As String, Arg2 As String, Arg3 as
Integer) As Integer
' Do something
Return 0
End Function

...Ignore me if OHR already does that.



-- 
Keith Gable
Lead Programmer / Project Leader
The Ignition Project http://www.ignition-project.com/

[Ask me how you can get a free Gmail account - Now with Google Chat!]
___
ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] [Bug 396] Can the OHR be compiled in FreeBasic 0.17?

2007-06-25 Thread Keith Gable
On 6/25/07, James Paige [EMAIL PROTECTED] wrote:

 I used to use VB, and I don't remember it lacking type suffixes, nor do
 I remember any restrictions on where you could use GOSUB/RETURN

True, you can still Dim number$, word if you want... But IIRC you can
still do something like this:

Dim number$, word
number = This is a string
word = 31337

Basically what I'm saying is that you don't have to use the $/
suffixes; they're just used as a shortcut for Dim'ing variables.

I think .NET removed this ability though... :(

And also, I never used GOSUB in VB.

 a SUB is a function that has no return value. Yes, we can convert all
 our GOSUBS into real SUBs and FUNCTIONS. It is a process we have already
 started, but there is a long way to go. It is more than a simple syntax
 change. It also means we have to carefully scrub the code for use of
 undeclared globals (which is something we need to do anyway)

I thought there was some syntactical difference between SUB/FUNCTION
and how they can be used.

Nevermind then.

-- 
Keith Gable
Lead Programmer / Project Leader
The Ignition Project http://www.ignition-project.com/

[Ask me how you can get a free Gmail account - Now with Google Chat!]
___
ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] [Bug 396] Can the OHR be compiled in FreeBasic 0.17?

2007-06-25 Thread Mike Caron
On 6/25/07, Keith Gable [EMAIL PROTECTED] wrote:
 On 6/25/07, James Paige [EMAIL PROTECTED] wrote:
 
  I used to use VB, and I don't remember it lacking type suffixes, nor do
  I remember any restrictions on where you could use GOSUB/RETURN

 True, you can still Dim number$, word if you want... But IIRC you can
 still do something like this:

 Dim number$, word
 number = This is a string
 word = 31337

 Basically what I'm saying is that you don't have to use the $/
 suffixes; they're just used as a shortcut for Dim'ing variables.

My main argument against suffixes is that it is possible to have i%,
i, i$ AND i# all being distinct variables. And, if you swear against
doing that, why do you need the suffixes?

 I think .NET removed this ability though... :(

 And also, I never used GOSUB in VB.

  a SUB is a function that has no return value. Yes, we can convert all
  our GOSUBS into real SUBs and FUNCTIONS. It is a process we have already
  started, but there is a long way to go. It is more than a simple syntax
  change. It also means we have to carefully scrub the code for use of
  undeclared globals (which is something we need to do anyway)

 I thought there was some syntactical difference between SUB/FUNCTION
 and how they can be used.

 Nevermind then.

There is, slightly. You can't use a SUB as a right-hand value. And,
you get a warning if a function doesn't return anything.


-- 
Mike Caron
Final Fantasy Q
http://finalfantasyq.com
___
ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] [Bug 396] Can the OHR be compiled in FreeBasic 0.17?

2007-06-25 Thread James Paige
On Mon, Jun 25, 2007 at 07:38:05PM -0500, Mike Caron wrote:
 On 6/25/07, Keith Gable [EMAIL PROTECTED] wrote:
  On 6/25/07, James Paige [EMAIL PROTECTED] wrote:
  
   I used to use VB, and I don't remember it lacking type suffixes, nor do
   I remember any restrictions on where you could use GOSUB/RETURN
 
  True, you can still Dim number$, word if you want... But IIRC you can
  still do something like this:
 
  Dim number$, word
  number = This is a string
  word = 31337
 
  Basically what I'm saying is that you don't have to use the $/
  suffixes; they're just used as a shortcut for Dim'ing variables.
 
 My main argument against suffixes is that it is possible to have i%,
 i, i$ AND i# all being distinct variables. And, if you swear against
 doing that, why do you need the suffixes?
 

I find that when I write in other languages, I often end up with a lot 
of variables with names like query_string or break_string or 
fatal_string. In Basic I would name those query$ break$ fatal$. Being 
able to see type at a glance can be valuable.

See also http://en.wikipedia.org/wiki/Hungarian_notation (which I never 
use-- just an illustration of a similar concept)

---
James Paige
___
ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] [Bug 396] Can the OHR be compiled in FreeBasic 0.17?

2007-06-25 Thread Mike Caron
On 6/25/07, James Paige [EMAIL PROTECTED] wrote:
 On Mon, Jun 25, 2007 at 07:38:05PM -0500, Mike Caron wrote:
  On 6/25/07, Keith Gable [EMAIL PROTECTED] wrote:
   On 6/25/07, James Paige [EMAIL PROTECTED] wrote:
   
I used to use VB, and I don't remember it lacking type suffixes, nor do
I remember any restrictions on where you could use GOSUB/RETURN
  
   True, you can still Dim number$, word if you want... But IIRC you can
   still do something like this:
  
   Dim number$, word
   number = This is a string
   word = 31337
  
   Basically what I'm saying is that you don't have to use the $/
   suffixes; they're just used as a shortcut for Dim'ing variables.
 
  My main argument against suffixes is that it is possible to have i%,
  i, i$ AND i# all being distinct variables. And, if you swear against
  doing that, why do you need the suffixes?
 

 I find that when I write in other languages, I often end up with a lot
 of variables with names like query_string or break_string or
 fatal_string. In Basic I would name those query$ break$ fatal$. Being
 able to see type at a glance can be valuable.

 See also http://en.wikipedia.org/wiki/Hungarian_notation (which I never
 use-- just an illustration of a similar concept)

Hungarian notation is a bane to all of existence.

Well, maybe it's not that bad, but my variables are usually unadorned.

-- 
Mike Caron
Final Fantasy Q
http://finalfantasyq.com
___
ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] [Bug 396] Can the OHR be compiled in FreeBasic 0.17?

2007-06-25 Thread Keith Gable
On 6/25/07, Mike Caron [EMAIL PROTECTED] wrote:
  See also http://en.wikipedia.org/wiki/Hungarian_notation (which I never
  use-- just an illustration of a similar concept)

 Hungarian notation is a bane to all of existence.

 Well, maybe it's not that bad, but my variables are usually unadorned.

I've been doing this since I started using VB and was totally unaware
that someone else thought of that idea too. Hm.

But if we're really looking for getting rid of the Dim str$ stuff,
maybe naming it strWhatever will make everyone happy? I dunno. It's
really not a big deal AFAICT, it's just the act of changing them that
will be the pain.

-- 
Keith Gable
Lead Programmer / Project Leader
The Ignition Project http://www.ignition-project.com/

[Ask me how you can get a free Gmail account - Now with Google Chat!]
___
ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] [Bug 396] Can the OHR be compiled in FreeBasic 0.17?

2007-06-25 Thread James Paige
On Mon, Jun 25, 2007 at 10:43:41PM -0500, Keith Gable wrote:
 On 6/25/07, Mike Caron [EMAIL PROTECTED] wrote:
   See also http://en.wikipedia.org/wiki/Hungarian_notation (which I never
   use-- just an illustration of a similar concept)
 
  Hungarian notation is a bane to all of existence.
 
  Well, maybe it's not that bad, but my variables are usually unadorned.
 
 I've been doing this since I started using VB and was totally unaware
 that someone else thought of that idea too. Hm.
 
 But if we're really looking for getting rid of the Dim str$ stuff,
 maybe naming it strWhatever will make everyone happy? I dunno. It's
 really not a big deal AFAICT, it's just the act of changing them that
 will be the pain.

Nah. This debate is mostly a philosophical one, and actually has very 
little bearing on how the OHR will be developed. Our current coding 
style standard is:

1) when editing existing code just to try to make your code style match 
the code around it

2) when writing new code make a reasonable effort for it not to suck :)

See Also: BIG BALL OF MUD: http://www.laputan.org/mud/

---
James Paige
___
ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org