| |
|
|
Hubert Binnewies | Hello together..
small trouble.. i'd me gladly a couple functions write The me the program on my derzeitigen proposition vereinfachen. the stupid is only that I into most functions several Rückgabewerte have.
I Have The Help in XProfan through and always only seen the one with RETURN only a worth back give can.
or Have I there what overlooking?
How can I several values give back?
thanks Schonmal beforehand.
Hubert |
|
|
| WinXP Prof, XProfan 9.1 Newbie
Ein kluger Kopf sagte mal: "Nach dem derzeitigen Stand der Technik ist es unmöglich Programme zu schreiben, die fehlerfrei laufen!" | 09/15/06 ▲ |
|
|
|
|
RGH | No, you have nothing overlooking: How in all others Languages too has a function extakt one Funktionsergebnis and accordingly a Return Value.
in principle there two Opportunities, these Limitierung To bypass:
1. to that a could You several values as Teilstring one Strings transfer. XProfan has, particularly ex Version 10, mighty command to that Use with Substrings. so could to that example in the procedure stand: CompileMarkSeparation in the aufrufenden Program sähe it then so from: CompileMarkSeparation 2. The others Possibility is the usage of/ one structure or. one Objektes, there hierbei Yes only the Zeiger on The function transfer becomes: CompileMarkSeparation The function would so looks: CompileMarkSeparation About return would I possible yet zurückggeben, whether The function successful was. in the aufrufenden Program sähe it then about so from: CompileMarkSeparation!success% = meineFunktion(Erg#)
x% = Erg#.x%
y% = Erg#.y%
z% = Erg#.z%
with the second Solution can also komplexere data elegant zurückgeliefert go. (These Solution is too in others Programmiersprachen right common.)
Greeting Roland |
|
|
| Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 09/15/06 ▲ |
|
|
|
|
Hubert Binnewies | thanks for really erschöpfende operator....
but I think I take a further Possibility...
I definiere me suitable globale variables The I in the Procedur always first vain and then with the Return Value versehe.
sooft How I The Proceduren need rewards itself the take action think I..
but again thanks... your response I will with safety later time need.
Hubert |
|
|
| WinXP Prof, XProfan 9.1 Newbie
Ein kluger Kopf sagte mal: "Nach dem derzeitigen Stand der Technik ist es unmöglich Programme zu schreiben, die fehlerfrei laufen!" | 09/15/06 ▲ |
|
|
|
|
| Have here another example, without jegliche globale Variable. Simuliertes byRef CompileMarkSeparation Proc Test2 over gives whom Pointer of c& and d& on Proc Test1, which there 50 and 100 as Return enters. How one see, no global Variables and the area becomes too same disposed
hope time, the can someone use
// Nachtrag: Have whom code yet something extended, so one sees, the it really goes
here again without Hilfsstructur, Have I not at all dran virtual, the it in Profan too so goes: CompileMarkSeparation is Perhaps verständlicher |
|
|
| |
|
|
|
| Weils so beautiful is, yet The simplest Variante (Have so unfortunately yet To little made ) CompileMarkSeparation |
|
|
| |
|
|
|
| Ähem - You änderst still nothing moreover as the value of global variables - and the too yet umständlich. |
|
|
| |
|
|
|
| [quote:a6584bda33=iF]Ähem - You änderst still nothing moreover as the value of global variables - and the too yet umständlich. [/quote:a6584bda33] The variables in both Proc are pub, Proc Test1 changes The variables of Test2, Gleichnamige Globale variables stay too receive. functions so though not Strings. Globale variables go not changed
I commit whom Pointer and make a profanischen Poke |
|
|
| |
|
|
|
| Ne balderdash - You deklarierst two Globale - The änderst You in Proc - More not. your code is not without Globals The You uses.
or stand I aufm Hose? |
|
|
| |
|
|
|
| [quote:869f8d550b=iF]Ne balderdash - You deklarierst two Globale - The änderst You in Proc - More not. your code is not without Globals The You uses.
or stand I aufm Hose? [/quote:869f8d550b] by me GEHTS:: CompileMarkSeparation |
|
|
|
|
| alas now! clear! Have the Declare in the second Proc overlooking!
Thomas wants say, simple The Adressen the variables on a Proc transfer, and the Variableninhalte by Long Change. |
|
|
| |
|
|
|
Hubert Binnewies | ööööööhmmmmmm.....
and if I no numerischen values separate Strings have??
(not so bad The Solution, can I use)
Greeting Hubert |
|
|
| WinXP Prof, XProfan 9.1 Newbie
Ein kluger Kopf sagte mal: "Nach dem derzeitigen Stand der Technik ist es unmöglich Programme zu schreiben, die fehlerfrei laufen!" | 09/15/06 ▲ |
|
|
|
|
Rolf Koch | only to expansion: since Ewigkeiten schlummert under Own Codes folgenders on of my Page More than a Parameter a procedure zurückliefern - New (19.03.2003)
one ought to too time on of my Page look *lol* |
|
|
| |
|
|