| |
|
|
| I work strain in a Update of XPSE what about me have The Keyworderkennung correct.
XPSE respect now not only whether a Identifier declared is, separate whether this too the right Prefix and Postfix carry.
Hierbei be I strain at a interessanten place arrived, because I could now whom XPSE join nichtdeklarierte variables To deklarieren. the could heissen the one variables not at all More deklarieren must. simply use, XPSE declared unauffällig in the background.
thereby come into being naturally but a couple ask!
a) The Programmieranfänger could itself prescribe, and itself wonder not gemackert becomes the its Variable not declared is.
b) How should XPSE decide if a in a procedure used Variable already in the Parent (or. Global) declared is. what means the XProfan then? The Globale or a new Locale?
c) ought to it the standard his the the Autodeklarieren eingeschaltet is, or ought to it only over Kompilerschalter aktivierbar his?
d) Have I ask forget? |
|
|
| |
|
|
|
RGH | [quote:417b5c2a5a=iF]a) The Programmieranfänger could itself prescribe, and itself wonder not gemackert becomes the its Variable not declared is.[/quote:417b5c2a5a] not only Programmieranfänger make Tippfehler! so a automatically declared Variable would in a more Program The Fehlersuche to that Horrorszenario make. there power one time a Tippfehler, about with the Zuweisung. The Variable wid automatically declared. And then seek one itself a wolf, Why whom this worth never to that carry comes. there's Yes so many Opportunities ... the would for me the Hauptgrund, this feature not even anzubieten!
[quote:417b5c2a5a]b) How should XPSE decide if a in a procedure used Variable already in the Parent (or. Global) declared is. what means the XProfan then? The Globale or a new Locale?[/quote:417b5c2a5a] naturally is then The globale, or. go wrong Variable To take. where ought to XPSE The Gewissheit take, that the Programmer not aware so pseudo has?
what I me present could, if XPSE in a such drop (not b)!) nachfragt: Variable xy not declared. should tappt im dunkeln declared go?. clicking the users on Yes, becomes tappt im dunkeln into Source at the beginning the procedure/the Program eingefügt, clicking it on No, fractures XPSE ex, so the users its code correct can.
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 | 10/04/06 ▲ |
|
|
|
|
| [quote:c10ff94482=RGH]the would for me the Hauptgrund, this feature not even anzubieten![/quote:c10ff94482] Well! one declared nothing in C (at least becomes one not forced this within of/ one self-contained instruction To do) and not PHP. there's gigantic C PHP-programs - with the the Fehlersuche as Begründung, the feature not at all anzubieten, stops I but not only therefore wrong, separate too because the Debugging in the Fehlerfall chiefly not therefore stirs the one a variable wrong written has!
I must moreover confess, Variablendeklarationen nerves me (the has nothing with Typendeklaration To do!) and except - the it for the better understanding at Programmierenlernen helps, see I mere mathematical none reason moreover - if the Programmer self determining, the it capable is too without Deklaration of variables these To using.
I stops the whole sooner for a tolles feature instead of one Teufelswerk. I Search only to one klaren and verständlichen principle for Umsetzung with Grenzfällen.
naturally must Arrays and Structures furthermore declared go - i'd me too first only on a type fall - naturally The Longs. |
|
|
| |
|
|
|
| Nachtrag: the best is probably the Procedures gänzlich To kapseln. therein using variables are always local.
If one - and the gucke I me simply the Erfahrungsschatz of PHP ex - a globale (or go wrong) Variable means, then must these with the Schlüsselwort Global as Global declared go.
example: CompileMarkSeparation |
|
|
| |
|
|
|
Michael Wodrich | then must well again one switch since.
i'd not so jolly find, if a automatic transmission me lauter globale variables hinballert. the would like I still tunlichst avoid.
And if someone a variable gladly as globale having would like, then should it the Please explizit indicate. otherwise ought to The Variable always pub his.
The benefit is simply: has one itself on it gewöhnt everything pub To deklarieren and items The elsewhere needed go as Parameter weiterzureichen, then has one too no Problems with Threads and Prozessen.
too the Hauptprogramm can on globale variables dispense:
Main Run_Main_Program End
and schwups is everything in Procedures and functions in the local associated area. If Roland yet The System-Variables in a Namespace GLOBAL_VARS eintütet...
Best wishes Michael Wodrich
was the Turbo-iF again faster....... |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 10/04/06 ▲ |
|
|
|
|
| very Michael - soooooooooooo see ichs too. ^^ |
|
|
| |
|
|
|
RGH | means at least in C C++ (and in Java) is with the Typdeklaration too The Variable declared. and in the entrapment one Schreibfehlers on later place becomes nothing automatically declared, separate a Error Message outputted, that the Variable not yet declared is. inverse there naturally too a Error Message, if The Variable declared and in the equal block already declared is.
wished one this with XPSE in XProfan-Syntax transfer, could one one new Schlüsselwort to introduce, about VAR and with this then How in C The Variable on the Fly at first appear deklarieren: CompileMarkSeparation (the entspräche in C/C + +/Java: String X = Hugo Maier;) These Variable would naturally pub in the actually procedure/method. If I so above nachdenke .... pack I the same time on The ToDo-list for XProfan 11. The Variante gefällt me and might too right rasch To release his!
The thought, that in a procedure/method only local variables famous are, has a crowd for itself. XProfan lean itself here but on Pascal/Delphi on, in the go wrong variables in Procedures/functions famous are. I have already above thought, this behaviour by Compilerschalter To steer and the from TurboBasic and Basic known SHARED (in lieu of the of iF suggested GLOBAL) To use, circa on variables the übergeordneten plain grab to. These is Yes not zwangsläufig Global, separate can also The aufrufende procedure his. but I schweife ex. here should it Yes circa XPSE weg and not m future XProfan-versions ... ;)
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 | 10/04/06 ▲ |
|
|
|
|
| Hm. clear, var. can of xprofaneigenen PreCompi Done go - in XProfan can indeed IMHO variables eh onthefly declared go.
I exercise me means simply time on it, a with a Kompilerschalter To aktivierenden mode produce, circa optional The Autodeklaration einzuschalten. Perhaps come into being thereby Yes jolly Gesetzmäßigkeiten which compatible stay. |
|
|
| |
|
|
|
RGH | [quote:aa916e5c88=iF]in XProfan can indeed IMHO variables eh onthefly declared go.[/quote:aa916e5c88] say we time so: the DECLARE can on eachone place in the program stand. though need it hold these Extrazeile. VAR would therefore even yet something faster, though only, if it really in XProfan installed becomes, and not by Precompiler in Declare X$ : X$ = transformed becomes. (DECLARE screen from Tempogründen neither, whether these Variable already declared is. it'll simply always The lastly declared Variable taken. but the has yet nobody angemeckert.) with VAR could one hold same a Zuweisung contact and saving these Extrazeile. In Java (my derzeitige Hauptsprache in the firm) have I integrally well on these Vorgehensweise gewöhnt.
Greeting Roland (Perhaps becomes it but already in XProfan 10 undokumentiert drin his ... ;) ) |
|
|
| 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 | 10/04/06 ▲ |
|
|
|
|
| Grosse class
<offtopic>PS: XPSE can in the next Version Umlaute, but I would it never admit and as bow deklarieren. </offtopic> |
|
|
| |
|
|
|
Jac de Lad | <offtopic> Oh, this is well! </offtopic> |
|
|
| 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 | 10/05/06 ▲ |
|
|
|