English
C ++ Forum

Deklarationen in Select-block

 
- Page 1 -


Sebastian should what behind CaseOfAnweisungen standing in functions umlenken... Aufwandsfrage
 
07/28/08  
 



 
- Page 1 -



Jac
de
Lad
however, now GEHTS anyway. If I sincere be, the "Var"-commands is me anyhow suspekt. The variables should at the beginning the program or. the Proc declariert and be Schluss.
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
07/28/08  
 




Sebastian
König
iF
Ehhh, glatter prf2cpp-bow. within CaseOf-Blöcken no Variablendeklarationen not allows? oO

The Deklaration is already allows, but to the EndSelect or in another CaseOf-block must then not any more hereon zugegriffen go. In C++ are local variables hold always only actually block validly...

...and others Languages is it at least badly Style!

MfG

Sebastian
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
07/28/08  
 



memory alloziieren behind endSelect or caseOf-block badly Style? Nunu, the stops I for a ventured testimony there it in XProfan no variables gives with them The variables, which you mean, vergleichbar wären.

In XProfan are variables well sooner Speicheraliase - simply fine! here between .data and .code To discern is the, I "gewagt" name.

Why erkundest not The Deklarationen before and ziehst tappt im dunkeln "hoch"?
 
07/28/08  
 




Sebastian
König
iF
Why erkundest not The Deklarationen before and ziehst tappt im dunkeln "hoch"?

Something like make I partly, with Procedures, The several Parameters Lines having. but here goes it Yes circa something like How
CompileMarkSeparation
select test%

    casof 1
    var a& = 1
    var b& = 2

    caseof 2

    var a& = 3
    var b& = 4

endselect

print a& span> b&

this code would to that example if Test% weder 1 yet 2 is, a Error Message to Laufzeit produzieren. therefore be I the opinion, that a& and b& in each drop to the Select declared go should. with variables, The each only pub in a the CaseOf-pieces using go, is the naturally something other...

MfG

Sebastian

P.s.: Per Brute-Force GEHTS too now already with Profan2Cpp: simply "Alle variables global deklarieren" enable.
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
07/28/08  
 




Jac
de
Lad
[QUOTE_="Sebastian König"][QUOTE_="iF"]..."Alle variables global deklarieren"...[/QUOTE]
what not always recommendable is.
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
07/28/08  
 



Sebastian king
something like How
CompileMarkSeparation
proc a

    select test%

        casof 1
        var a& = 1
        var b& = 2

        caseof 2

        var a& = 3
        var b& = 4

    endselect

    print a& + b&

CompileMarkSeparation
declare a&,b& because in the selectblock deklarationen for a& and b& found get

select Test%

    casof 1
    a& = 1
    b& = 2

    caseof 2

    a& = 3
    b& = 4

endselect

print a& + b&

but i think others items are there importent!
 
07/28/08  
 




Sebastian
König
iF
The Vars in the Select could still simply fundamentally so "hoch ziehen":


already clear, what you mean, but I likes the whole somehow not. The wiederholten Deklarationen are so too redundant - on the dearest would I only whom Syntax-Check moreover bring, the whole anzumeckern... but what reserves - XProfan allows the whole Yes unfortunately what about me will be me in the a or others shape therefore concern must...

@Jac: Yes, "Alle variables global deklarieren" ought to really only as last way out using go.

MfG

Sebastian
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
07/28/08  
 



Sebastian king
The wiederholten Deklarationen are so too redundant - on the dearest would I only whom Syntax-Check moreover bring, the whole anzumeckern...


around the question to the switch to oppression this Message vorzuprogrammieren...

some items go but gänzlich you don't say so his there XProfan Yes dank the Runtime Opportunities own, which nunmal a "Runtimeumgebung" need...
 
07/28/08  
 




Sebastian
König
iF
around the question to the switch to oppression this Message vorzuprogrammieren...

at least from you ;). but find You, the with the wiederholten Deklarationen really beautiful?

iF
some items go but gänzlich you don't say so his there XProfan Yes dank the Runtime Opportunities own, which nunmal a "Runtimeumgebung" need...


Yes, in the doing. Set("Escape",...) and Execute wären an example for, where latter indeed in XProfan self only Interpreter functions. still becomes it soon one Plug-In give, the one with for care can, that %ProgEnd a korrekten worth supply. here would my interests, whether the except Jac otherwise yet someone bring into action would...

MfG

Sebastian

P.s.: i'll The Thread time splitten - is the automatic add one Hinweises on The Aufteilung really already implementiert? EDIT: evident not - would really useful!
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
07/28/08  
 



Sebastian king
but find You, the with the wiederholten Deklarationen really beautiful?


Wiederholte?

Deklarieren to VAR stops I for a smart decision at program with XProfan.

so ists automatically too "schön", it power Yes sense.

Sebastian king
P.s.: i'll The Thread time splitten - is the automatic add one Hinweises on The Aufteilung really already implementiert? EDIT: evident not - would really useful!


the fetch I to!
 
07/28/08  
 




Sebastian
König
iF
Wiederholte?

Deklarieren to VAR stops I for a smart decision at program with XProfan.

so ists automatically too "schön", it power Yes sense.


with repeatedly my I the Deklarieren the equal variables into diversen CaseOf-Blöcken instead of one Declare to the Select. whom Var-commands on itself stops so did i for a very virtually expansion!
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
07/28/08  
 



 
- Page 2 -


iF
Crazy I, or should one otherwise variables deklarieren, which one Perhaps not needed?


either You irrst or you've got me wrong: me goes it The whole Time only circa such variables, The to the Select-block yet moreover using go.
 
07/28/08  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

5.751 Views

Untitledvor 0 min.
Dean Wood01/27/13

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie