HELP!!! Variable value transfer 
Author Message
 HELP!!! Variable value transfer

I'm using CW5b (ABC).

This is probably very easy to do, but I just can't figure it out:

I have a Browse procedure from which you can press a Print button to
call a Report procedure. Basic stuff anyway. Now, I want to define a
variable (under DATA button in proc properties) and assign a value
(e.g. SUM of one field in the file browsed) and I want this same field
and value to be on report too. And I DON'T wanna use a globally defined
variable, because I need to recompile whole application plus I don't
need the value to be available all the time app is running. So how can
I define variable locally and in the easiest way transfer the value to
the other procedure??

I hope I made myself clear

Please help me

Bostjan

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Mon, 30 Dec 2002 03:00:00 GMT  
 HELP!!! Variable value transfer


Quote:
> I'm using CW5b (ABC).

> This is probably very easy to do, but I just can't figure it out:

> I have a Browse procedure from which you can press a Print button to
> call a Report procedure. Basic stuff anyway. Now, I want to define a
> variable (under DATA button in proc properties) and assign a value
> (e.g. SUM of one field in the file browsed) and I want this same field
> and value to be on report too. And I DON'T wanna use a globally
defined
> variable, because I need to recompile whole application plus I don't
> need the value to be available all the time app is running. So how can
> I define variable locally and in the easiest way transfer the value to
> the other procedure??

Why not passing as paramter ?
Look in properties, and write in prototype : (datatypeOfYourVariable)
Do not forget the '(' and ')'!
Write in parameter :datatypeOfYourVariable NameOfYourVariable

when calling the procedure :
NameOfYourProcedure (NameOfYourVariable).

This should do.

Ralf

Sent via Deja.com http://www.deja.com/
Before you buy.



Mon, 30 Dec 2002 03:00:00 GMT  
 HELP!!! Variable value transfer
If the procedures are in the same module, you can define your field on the module level.
Changing the prototype of the procedure will also trigger the recompiling of the whole App as will moving the procedures from one
module to another.

HTH
--
Regards !
Udo Cizelj
Maribor, Slovenija
Using: CPD2.1,CFD3.1,CW20


Quote:
>I'm using CW5b (ABC).

>This is probably very easy to do, but I just can't figure it out:

>I have a Browse procedure from which you can press a Print button to
>call a Report procedure. Basic stuff anyway. Now, I want to define a
>variable (under DATA button in proc properties) and assign a value
>(e.g. SUM of one field in the file browsed) and I want this same field
>and value to be on report too. And I DON'T wanna use a globally defined
>variable, because I need to recompile whole application plus I don't
>need the value to be available all the time app is running. So how can
>I define variable locally and in the easiest way transfer the value to
>the other procedure??

>I hope I made myself clear

>Please help me

>Bostjan

>Sent via Deja.com http://www.deja.com/
>Before you buy.



Mon, 30 Dec 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. value of value of a variable ?

2. help for newbie: way to get the value of an awk variable in a shell script

3. Help - losing variable value

4. help setting a value to a local field variable on a form

5. HELP: Runtime variable's value crashes program

6. HELP: changing variable value from menu in lower proc

7. treat value in a variable as a variable

8. values of variable variable-names

9. Use global variable to transfer user parameter in some Vi

10. Use global variable to transfer user parameter in some Vi

11. How to load executables and transfer variable name to FORTRAN

12. how to transfer variable between two programs?

 

 
Powered by phpBB® Forum Software