Small start on site setup

This commit is contained in:
Jeremy Vyska 2021-10-22 00:22:09 +02:00
parent f5fdb14ad8
commit 17ee241708
3 changed files with 54 additions and 0 deletions

View file

@ -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;

12
content/welcome/_index.md Normal file
View file

@ -0,0 +1,12 @@
+++
chapter = true
pre = "<b><i class='fas fa-home'></i> </b>"
title = "Welcome"
weight = 5
+++
### Chapter X
# Some Chapter title
Lorem Ipsum.