Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
3
Erster Beitrag:
vor 1 Jahr, 1 Monat
Letzter Beitrag:
vor 1 Jahr, 1 Monat
Beteiligte Autoren:
DerekM, Igor Pobi

[WD] variable out of scope [resolved :)]

Startbeitrag von DerekM am 13.10.2016 22:54

Hi

I have just encountered a (so far) seemingly strange thing...

I created a new project - and imported global procedures from an existing project. [WD19]

(The existing project is a standard 64 bit configuration - the new project is configured as a webservice)

The new (WD webservice project) gives compile errors for out of scope variables. The variables "are" out of scope in that they are declared within an IF-ELSE-END block - then used/referenced outside the block (below the declaration).

However, this code does not flag any errors in the existing Windows project - and seemingly works fine.

I am trying to figure out how and why the compiler works differently with different configurations. So far, I am just assuming that that is the way it is - and that as a 'webservice' it is being compiled with a different compiler - perhaps for compatibility with the application server?

Anyone have any insights as to what is actually happening?


Regards
Derek

Antworten:

Re: [WD] variable out of scope

Hello !

See option in WinDev (Project -> Compilation -> Scope of local variables limited to the current block)

[attachment 2193 Picture1.jpg]

von Igor Pobi - am 14.10.2016 07:46

Re: [WD] variable out of scope

Ah! Yes. Thank you!

von DerekM - am 17.10.2016 01:34
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.