diff --git a/content/NAVPatterns/with-scope-name-collision/index.md b/content/NAVPatterns/with-scope-name-collision/index.md new file mode 100644 index 00000000..7c73b9eb --- /dev/null +++ b/content/NAVPatterns/with-scope-name-collision/index.md @@ -0,0 +1,29 @@ ++++ +title = "with-scope-name-collision.md" +weight = 1450 ++++ +Do not use the WITH scope when it has a variable whose name is the same as a local variable. This can lead to wrong code assumptions. + +**Given that **"Contract Type" is a field on table ServiceContractHeader, then in the following example there is a parameter name clash with the field name. Which one will be used? + +Bad code + + PROCEDURE InsertData@1("Contract Type"@1000 : Option...); + ... + BEGIN + ... + WITH ServiceContractHeader DO BEGIN + ... + DimMgt.InsertServContractDim(...,"Contract Type","Contract No.",0,...); + END; + +Good code + + PROCEDURE InsertData@1(ContractType@1000 : Option...); + ... + BEGIN + ... + WITH ServiceContractHeader DO BEGIN + ... + DimMgt.InsertServContractDim(...,ContractType,"Contract No.",0,...); + END; diff --git a/content/welcome/_index.md b/content/welcome/_index.md new file mode 100644 index 00000000..301affd8 --- /dev/null +++ b/content/welcome/_index.md @@ -0,0 +1,12 @@ ++++ +chapter = true +pre = " " +title = "Welcome" +weight = 5 ++++ + +### Chapter X + +# Some Chapter title + +Lorem Ipsum. \ No newline at end of file diff --git a/layouts/partials/logo.html b/layouts/partials/logo.html new file mode 100644 index 00000000..ff98f2c5 --- /dev/null +++ b/layouts/partials/logo.html @@ -0,0 +1,13 @@ + + + Code is Poetry \ No newline at end of file