Search Options
Skip to main content (Press Enter).
Sign in
Skip auxiliary navigation (Press Enter).
Skip main navigation (Press Enter).
Toggle navigation
Search Options
Home
Forums
All Forums
My Forums
IBM i
IBM zSystems
MultiValue
Uniface
Browse
Help/FAQs
All Discussion Posts
Blog Posts
Announcements
Digital Disrupted Podcast
Getting Started
Join the Forum
MVVS: MV Basic for Visual Studio
View Only
Sub-Forum Home
Threads
318
Members
246
Back to {0}
includeFiles array
Thread closed by the administrator, not accepting new replies.
Add a tag
x
User Tags may not contain the following characters: @ # $ & :
PARTNER
John Green
posted 05-11-2022 02:04
Is it possible to have the includeFiles act as a hierarchy. For example,
"includeMapping"
: [
{
"includeFile"
:
"INCLUDEFILES"
,
"fileName"
:
"INCLUDEFILES_DEV"
}
{
"includeFile"
:
"INCLUDEFILES"
,
"fileName"
:
"INCLUDEFILES_PROD"
}
]
And in my code I can write:
$INCLUDE INCLUDEFILES STDREADER
In the example above MV Basic would look for the "STDREADER" code in the INCLUDEFILES_DEV file first and when its not there it will look in INCLUDEFILES_PROD. This aligns with our source control process (check-out to _DEV, check-in to _PROD) and the way our pre-compiler works.
My experiments indicate that MV Basic assumes each object in the includeFiles array has a unique value for the includeFile member and so it stops searching when it finds one.
Thanks
ROCKETEER
Christian Bristow
posted 05-11-2022 10:50
In short, no. I have tested this too and currently each includeFile entry has to be unique as seen in the Include documentation Example 3
>here<
I will communicate with you directly via a support ticket on our options.
Sean Hannam
posted 05-12-2022 07:35
Hi
Is it not possible to tackle this a different way?
In your code have the following
$INCLUDE INCLUDEFILES
INCLUDEFILES_DEV
$INCLUDE INCLUDEFILES
INCLUDEFILES_PROD
Wrap your DEV include with:
$IFNDEF INCLUDEFILES_DEV_INCLUDED
$DEFINE INCLUDEFILES_DEV_INCLUDED
...
...
$ENDIF
Then wrap your PROD in the same
$IFNDEF INCLUDEFILES_DEV_INCLUDED
$DEFINE INCLUDEFILES_DEV_INCLUDED
...
...
$ENDIF
This way if your dev include has already been 'included' it will skip including your prod.
PARTNER
John Green
posted 05-12-2022 20:42
@Sean Hannahan
, I'm not sure this helps direct the search MV Basic extension for VS Code will perform to find the correct INCLUDE file at edit time. Am I missing something?
Copyright 2022. All rights reserved.
Powered by Higher Logic