![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
after searching old messages (found one from 2004) it looks like PICK still doesn't allow the creation of a function in Basic .. |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
after searching old messages (found one from 2004) it looks like PICK still doesn't allow the creation of a function in Basic .. Is this true? Thanks DSig David Tod Sigafoos |
#5
| |||
| |||
|
|
after searching old messages (found one from 2004) it looks like PICK still doesn't allow the creation of a function in Basic .. If by "Pick" you mean D3, I think that this is true. The Information style products (Information, PI/open, UniVerse, Unidata, OpenQM, etc) have allowed this for many years. The function is effectively a subroutine that returns a value via a hidden first argument. OpenQM takes it further and allows "internal functions" in just the same way as you can have internal subroutines. There are many places where these are useful, keeping the function encapsulated with the program logic to which it relates and removing the need to load a separate program image for the function itself. Martin Phillips, Ladybridge Systems. |
#6
| |||
| |||
|
|
You can create user defined functions in C and add them to the functions usable as %function. This, however, requires that you add the routine to D3 using addbi and then make the D3 file again. There's no provision for creating data/basic functions. Bob Mitchell President Future Software Systems, Inc. |
#7
| |||
| |||
|
|
Basically true. However, if you don't need to pass parameters "by reference", you can do this: Write a subroutine that has a single passing parameter. This parameter can be anything, but there must be only one. Extremely simple example: sub add.function(PX) px = px<1> + px<2 return Then, in you Pick Basic code, you can add a line like this: x = oconv(A:@am:B,"call add.function") Acts exactly like a function. The only caviat is that you can't pass a parameter that gets changed and passed back as something other than the answer. I've been doing this for several years now and it works pretty well for simple stuff. If you compile with the CS options, it barely shows up in the debugger. Basically, that's all Pick dictionary "calls" and triggers are, a simple function to take a parameter and return a result. Mark Brown "dtsig" <d... (AT) hotmail (DOT) com> wrote in message news:1176992918.574596.250400 (AT) o5g2000hsb (DOT) googlegroups.com... after searching old messages (found one from 2004) it looks like PICK still doesn't allow the creation of a function in Basic .. Is this true? Thanks DSig David Tod Sigafoos |
#8
| |||
| |||
|
|
Basically true. However, if you don't need to pass parameters "by reference", you can do this: Write a subroutine that has a single passing parameter. This parameter can be anything, but there must be only one. Extremely simple example: sub add.function(PX) px = px<1> + px<2 return Then, in you Pick Basic code, you can add a line like this: x = oconv(A:@am:B,"call add.function") Acts exactly like a function. The only caviat is that you can't pass a parameter that gets changed and passed back as something other than the answer. I've been doing this for several years now and it works pretty well for simple stuff. If you compile with the CS options, it barely shows up in the debugger. Basically, that's all Pick dictionary "calls" and triggers are, a simple function to take a parameter and return a result. Mark Brown "dtsig" <d... (AT) hotmail (DOT) com> wrote in message news:1176992918.574596.250400 (AT) o5g2000hsb (DOT) googlegroups.com... after searching old messages (found one from 2004) it looks like PICK still doesn't allow the creation of a function in Basic .. Is this true? Thanks DSig David Tod Sigafoos- Hide quoted text - - Show quoted text - |
#9
| |||
| |||
|
|
On Apr 19, 1:50 pm, "Mark Brown" <mbr... (AT) drexelmgt (DOT) com> wrote: Basically true. However, if you don't need to pass parameters "by reference", you can do this: Write a subroutine that has a single passing parameter. This parameter can be anything, but there must be only one. Extremely simple example: sub add.function(PX) px = px<1> + px<2 return Then, in you Pick Basic code, you can add a line like this: x = oconv(A:@am:B,"call add.function") Acts exactly like a function. The only caviat is that you can't pass a parameter that gets changed and passed back as something other than the answer. I've been doing this for several years now and it works pretty well for simple stuff. If you compile with the CS options, it barely shows up in the debugger. Basically, that's all Pick dictionary "calls" and triggers are, a simple function to take a parameter and return a result. Mark Brown "dtsig" <d... (AT) hotmail (DOT) com> wrote in message news:1176992918.574596.250400 (AT) o5g2000hsb (DOT) googlegroups.com... after searching old messages (found one from 2004) it looks like PICK still doesn't allow the creation of a function in Basic .. Is this true? Thanks DSig David Tod Sigafoos- Hide quoted text - - Show quoted text - cute workaround! (another opportunity regret...) dave- Hide quoted text - - Show quoted text - |
![]() |
| Thread Tools | |
| Display Modes | |
| |