Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Some news about Etecnologia VFP.compiler ??
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
VFP Compiler for .NET
Divers
Thread ID:
01295603
Message ID:
01297430
Vues:
25
Hi Hugo:

Your request was about not needing the mdot notation and about undeclared vars.

1. We have approached the mdot issue already. When you declare a var with
TLOCAL myVar
anywhere you type myvar the compiler and runtime treats them as a memory var, not need to include m.myvar, and it certainly avoids collision with fields names.

But this issue is more complex than what it looks, so keep reading.

For the undeclared vars, this is to avoid mistyping var names in your code we will enable a switch with several levels:

- warn-undeclared:0
Works as always and no warns about undeclared vars. This will be the default.

- warn-undeclared:1
Requires any var used to be unambigously declared before to be used. If you use a variable not declared it will show a warning. To use PUBLIC or PRIVATE vars in this scope you will have to declare it is visible with:
EXTERNAL varname

- warn-undeclared:2
Treats any used variable without declaration as error. Your code won't compile and you will have to fix it.

And then comes the issue about fields and tables:
We will be compiling your tables to .NET and make it accessible as an interface. So you will declare it as a typed. This is around the corner as we need it for several scenarios.
TLOCAL myTable as SomeDatabase::SomeTableOrView
myTable = GetTableInterface([eSomeAlias])
? MyTable.MynField  && Ok it exists
? MyTable.MyNotExistsField && Error at compile time, this field does not exists
This will make your TableCode orders of magnitude faster than VFP. It will be able to warn you of both typing mistakes and wrong use of your fields as :
TLOCAL cString as string
cString = myTable.MyNumberField && error type mismatch at compile time 

* or
? SUBSTR(myTAble.MyNumberField,1,4)  && error type mistmatch at compile time
Of course all these features are optional, and your old code run as always. But if you need more safety at compile time these features will help you, without hurting you.

Let me know if this answer your question.






>Hi Samuel,
>
>What about the "switch" I proposed in your compiler wiki? <g>
>
>>Don't like that? Me neither!
>>
>>We put this as a switch, you need to enable that switch in order to the compiler handle 4 letter abbreviations. By default it is not enabled.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform