From 17ee24170891682b81afcb6cf0e8a5e2dd998473 Mon Sep 17 00:00:00 2001 From: Jeremy Vyska <35526546+JeremyVyska@users.noreply.github.com> Date: Fri, 22 Oct 2021 00:22:09 +0200 Subject: [PATCH] Small start on site setup --- .../with-scope-name-collision/index.md | 29 +++++++++++++++++++ content/welcome/_index.md | 12 ++++++++ layouts/partials/logo.html | 13 +++++++++ 3 files changed, 54 insertions(+) create mode 100644 content/NAVPatterns/with-scope-name-collision/index.md create mode 100644 content/welcome/_index.md create mode 100644 layouts/partials/logo.html 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