Omitted 
Author Message
 Omitted

Beware, if using the OMITTED statement in your functions. The omitted(1)
statement no longer works in ABC. You must change it to omitted(2) for your
first prototype now that ABC(SELF) reserves this position for itself.

This is a little stupid IMO since this is hidden from the programmer. It should
be as it was before. NOW we must remember that ABC reserves this for itself, or
you get a whopping GPF on functions that worked fine in 2003 template chain.
And when you program in legacy 2003 you must remember you can use omitted(1).

Please return omitted to its proper use.

Ashley Stahl



Sat, 14 Jul 2001 03:00:00 GMT  
 Omitted
An easy way around this (at least for simple numeric types) is to use the
new prototyping schema ie.

MyProc   PROCEDURE(LONG MyLong=0)

Then in your code just use:

if not Mylong ...........

Steve B.
[Team Topspeed]

Quote:

>Beware, if using the OMITTED statement in your functions. The omitted(1)
>statement no longer works in ABC. You must change it to omitted(2) for your
>first prototype now that ABC(SELF) reserves this position for itself.

>This is a little stupid IMO since this is hidden from the programmer. It
should
>be as it was before. NOW we must remember that ABC reserves this for
itself, or
>you get a whopping GPF on functions that worked fine in 2003 template
chain.
>And when you program in legacy 2003 you must remember you can use
omitted(1).

>Please return omitted to its proper use.

>Ashley Stahl



Sat, 14 Jul 2001 03:00:00 GMT  
 Omitted
Hello!

Quote:

> Date: 26 Jan 1999 04:20:10 GMT

> Beware, if using the OMITTED statement in your functions. The omitted(1)
> statement no longer works in ABC. You must change it to omitted(2) for your
> first prototype now that ABC(SELF) reserves this position for itself.

> This is a little stupid IMO since this is hidden from the programmer. It
> should be as it was before. NOW we must remember that ABC reserves this
> for itself, or you get a whopping GPF on functions that worked fine in 2003
> template chain. And when you program in legacy 2003 you must remember you
> can use omitted(1).

> Please return omitted to its proper use.

OMITTED works correctly. SELF is the same parameter as all other. SELF is
always passing as a first parameter in calls of object's methods. This is
documented:

"The method's definition must either prepend the label of the CLASS to the
label of the PROCEDURE, or name the CLASS (and label it SELF) as the first
(implicit) parameter in the list of parameters passed in to the PROCEDURE.

Remember that on the PROCEDURE definition statement you are assigning labels
for use within the method to all the passed parameters, and so, since the
CLASS's label is the data type of the implicit first parameter, you must use
SELF as the assigned label for the CLASS name parameter. For example, for the
following CLASS declaration:

MyClass    CLASS

MyProc   PROCEDURE(LONG PassedVar)      !The method takes 1 parameter
           END

you may define the MyProc PROCEDURE either as:

MyClass.MyProc  PROCEDURE(LONG PassedVar)       !Prepend the CLASS name to
  CODE                                          ! the method's label

or as:

MyProc  PROCEDURE(MyClass SELF, LONG PassedVar) !The CLASS name is the
  CODE                                          ! implicit first parameter's
                                                  data type, labeled SELF
"

Your suggestion means that OMITTED should work in different ways depending
from the style how a procedure is declared. This would be absolutely wrong.

Alexey Solovjev




Sat, 14 Jul 2001 03:00:00 GMT  
 Omitted
I have to agree... Hey TOPSPEED... how about using omitted(0) for SELF???
Quote:

> Beware, if using the OMITTED statement in your functions. The omitted(1)
> statement no longer works in ABC. You must change it to omitted(2) for your
> first prototype now that ABC(SELF) reserves this position for itself.

> This is a little stupid IMO since this is hidden from the programmer. It should
> be as it was before. NOW we must remember that ABC reserves this for itself, or
> you get a whopping GPF on functions that worked fine in 2003 template chain.
> And when you program in legacy 2003 you must remember you can use omitted(1).

> Please return omitted to its proper use.

> Ashley Stahl



Sat, 14 Jul 2001 03:00:00 GMT  
 Omitted
Hi Julian,

On Tue, 26 Jan 1999 08:55:35 -0800, Julian Kalmar

Quote:

>I have to agree... Hey TOPSPEED... how about using omitted(0) for SELF???

That's not the problem.  The problem is that you are dealing with a)
the procedure's parameters and b) the methods parameters.  The
simplest way to do this is to call a routine from the .init method and
query the parameters there.  The routine is at procedure level, not
method level so it should return the correct stuff from the procedure:

 .init:

 Do CheckOmitted

CheckOmitted
  If Omitted(1)
    Loc:Omitted[1] = true
  Else
    Loc:Omitted[1] = false
  End

etc.  I think there are some other tricks - check IKB for more info.

Best regards,

Arnor Baldvinsson        
[Team Topspeed - Internet Connect]
Allerup Edb
Denmark

http://www.icetips.com  (http://199.34.26.68)
UIN nr.: 2428601



Sat, 14 Jul 2001 03:00:00 GMT  
 Omitted
Julian,

Quote:
> I have to agree... Hey TOPSPEED... how about using omitted(0) for SELF???

I think it's far too late to do that without breaking lots of code. A
better solution, which has been kicked around, would be to let use use
omitted(varname), if desired. I have no idea if/when this will be
implemented, however.

Dave

Dave Harms

Coming Feb 9 - Clarion Magazine!
Read the press release at http://www.clarionmag.com



Sat, 14 Jul 2001 03:00:00 GMT  
 Omitted
And it would be way more useful and more difficult to break on those
late nights.<g>

Quote:

> A
>better solution, which has been kicked around, would be to let use use
>omitted(varname), if desired. I have no idea if/when this will be
>implemented, however.

Jeff Slarve  [Team Topspeed(CW)(Compuserve)]
Developers of "In Back" Backup Software
J & S Software Co.  http://www.jssoftware.com
(CIS: 73501,1323)


Sat, 14 Jul 2001 03:00:00 GMT  
 Omitted
Quote:

> I have to agree... Hey TOPSPEED... how about using omitted(0) for SELF???

Would break a ton of my code where I have 1 based omits coded now.
---
Jim Kane  - TeamTopSpeed
Productive Software Solutions
Can't Find that Message?
Get Organized, Get ForKeeps!
www.fkeeps.com


Sat, 14 Jul 2001 03:00:00 GMT  
 Omitted
Yes I understand all of what you have said. But the fact remains that using ABC
for most people will be a little longer in coming then what I thinks Topspeed
would like. Omitted() is just a small example. One would wonder how much legacy
code is out there with this one statement. If it were not for the few lines of
code under the control I may still not have found it, only because there was no
compiler error. Yes we also right OOP's methods and yes we use the first of
your two sugestions. Only because it flows with the legacy code we have
written. If there is a vote for style then your first suggestion is my vote.
And Yes, maybe it should work two different ways.
Not much different then Var[1] a stringslice or Var[1] an array element.

Ashley Stahl



Sun, 15 Jul 2001 03:00:00 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Omit , Compile - same program various options

2. Omitting default scroll behaviour

3. How check OMITTED() in ABC procedure

4. Omitting report display

5. Omitting detail from report

6. "OMIT cannot be nested" error

7. Omitted in ThisWindow.Init

8. OMITTED() Question

9. Omitted

10. omit previous post about intrument drivers

11. Namelist omits names

12. Omit Leading Zeroes

 

 
Powered by phpBB® Forum Software