Jump to content


Photo
- - - - -

How should GLOBAL_LSCALL be formatted in logic


5 replies to this topic

Poll: How should GLOBAL_LSCALL be formatted in logic, in ProIV IDE? (37 member(s) have cast votes)

How should GLOBAL_LSCALL be formatted in logic

  1. GLOBAL_LSCALL(FUNCTION,0001) (12 votes [32.43%])

    Percentage of vote: 32.43%

  2. GLOBAL_LSCALL(FUNCTION,param1,param2,....) (19 votes [51.35%])

    Percentage of vote: 51.35%

  3. Dont care (6 votes [16.22%])

    Percentage of vote: 16.22%

Vote Guests cannot vote

#1 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,640 posts
  • Gender:Male
  • Location:Spain

Posted 08 June 2003 - 03:38 PM

Hi,

Personally, I don’t like the way that Global Function parameters are specified, when you call a global function.

I am trying to decide a better way and wondered what people thought.

We could stay with the current format, i.e.


GLOBAL_LSCALL(FUNCTION,0001)

And then have a popup window to define the links to the parameters.

Or how about this...


GLOBAL_LSCALL(FUNCTION,param1,param2,param3,....)

Then you would just list the parameters after the function name, instead of a popup.

As you typed the parameters you need to enter would popup in a tooltip, like this...

Posted Image

The second way is easier to view, I think, when you are looking through logic.

Any comments??

Thanks,

Rob D.

#2 Dan Shannon

Dan Shannon

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 374 posts
  • Gender:Male
  • Location:Australia

Posted 09 June 2003 - 12:50 PM

I think you should use the named parameters style as in PL/SQL:

GLOBAL_LSCALL(FUNCTION => 'GLOB_FUN', P_NAME_1 => $LOCAL, P_NAME_2 => 2)

This provides code redundancy at a wonderful level - you can add new parameters to the global without having to refactor calling code, you can specify them in whatever order you want in the calling code, you can ignore optional parameters and so on.

Personally I think the whole interface exposure of global functions is very ordinary as it relies solely on the order, not the name, of parameters. This makes it v painful when you want to make any changes to a global's interface.

Cheers

Dan Shannon

#3 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,640 posts
  • Gender:Male
  • Location:Spain

Posted 10 June 2003 - 12:16 PM

Hi Dan,

With my editor I do not change the way functions are stored, so that you can still use @MOD, DevStudio or VIP also. It would be stupid to restrict.

I can only 'translate' the function information saved in the Bootstraps into something different.

Therefor it is not really possible for me to do that, although its a good idea (Unless you have any good ideas)

Sorry,

Rob D.

#4 Wim Soutendijk

Wim Soutendijk

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 211 posts
  • Gender:Male
  • Location:Netherlands

Posted 10 June 2003 - 01:24 PM

Perhaps this would be a nice enhancement to your editor.
I would rather be able to see a beta version without this translation than wait longer for a version that includes this option.

#5 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,640 posts
  • Gender:Male
  • Location:Spain

Posted 10 June 2003 - 01:41 PM

Hi,

Ok... Point taken :rolleyes:

Just I have to code some sort of interface to the Global Functions, and it would actually be quicker to do the 2nd way than have a window popup...

Since there seems to be a requirement for both ways, maybe in the future I can have it as an option.

Rob D.

#6 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,640 posts
  • Gender:Male
  • Location:Spain

Posted 24 June 2003 - 02:51 PM

Hi,

Ok, since there is obviously a want for both ways, I'll start off with the tooltips method.

Then once I've got further along, I'll include the 'original' method as an option that you can switch between...

Thanks for the input,

Rob D.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users