Skip to content

Bug Fix. }bedrock.hier.unwind does nothing (and does not error) under certain parameters#447

Open
bdunleavy22 wants to merge 1 commit into
cubewise-code:masterfrom
bdunleavy22:patch-1
Open

Bug Fix. }bedrock.hier.unwind does nothing (and does not error) under certain parameters#447
bdunleavy22 wants to merge 1 commit into
cubewise-code:masterfrom
bdunleavy22:patch-1

Conversation

@bdunleavy22
Copy link
Copy Markdown

Bug Fix. }bedrock.hier.unwind does nothing (and does not error) under certain parameters
if pDelim = '' and pHier = '' and pDim is one dimension (no delimiter or wildcard characters and does not specify a hierarchy with ':') and pConsol is '*',
then all the places pHier gets defined will be false.
Line 71 is false because there is no ':' in pDim
Line 89 is false because SCAN( '', pDim ) = 1

This leads to line 140 being false, and line 193 being true.
In the line 193 IF block, pHier has not been redefined to anything. Therefore the HierarchyElementDelete and HierarchyElementInsert statements on line 206 and 207 fail because pHier is still ''

Redefining pHier is done in the block following 193, that starts at line 216

Solution

By moving the redefining of pDelim to the beginning, SCAN( '', pDim ) will be 0 instead of 1, which will make line 89 true which will define pHier.

… certain parameters

if pDelim = '' and pHier = '' and pDim is one dimension (no delimiter or wildcard characters and does not specify a hierarchy with ':') and pConsol is '*',
then all the places pHier gets defined will be false.
Line 71 is false because there is no ':' in pDim
Line 89 is false because SCAN( '', pDim ) = 1

This leads to line 140 being false, and line 193 being true.
In the line 193 IF block, pHier has not been redefined to anything. Therefore the HierarchyElementDelete and HierarchyElementInsert statements on line 206 and 207 fail because pHier is still ''

Redefining pHier is done in the block following 193, that starts at line 216

# Solution
By moving the redefining of pDelim to the beginning, SCAN( '', pDim ) will be 0 instead of 1, which will make line 89 true which will define pHier.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant