Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Olá a todos!
Tive um problema apresentado no tópico Erro no Must_Include e gostaria de entender a sintaxe na utilização de variáveis.
Como devem ser a utilização de ' ' (aspas) e $ na obtenção de valores de variáveis?
Ex:
Arq1=FileDir()&'QlikView\ApontamentoHoras-ScriptCarga.txt';
$(Must_Include='$(Arq1)');
ou
$(Must_Include=$(Arq1));
Obrigada.
When you use a dollar expansion, it is replaced by the variable value before the parser reads the statement. So in your case,
$(Must_Include='$(Arq1)');
will expand to
$(Must_Include='C:\Folder Name\QlikView\ApontamentoHoras-ScriptCarga.txt');
whereas
$(Must_Include=$(Arq1));
will expand to
$(Must_Include=C:\Folder Name\QlikView\ApontamentoHoras-ScriptCarga.txt);
You will probably want to include this expansion in quotes, since the path contains blanks. In other cases, it is better to expand it without quotes, e.g. if the variable contains a number that you want to use in a calculation.
HIC
Françoise
Dê uma olhada nesses posts do hic
The Magic of Dollar Expansions
When you use a dollar expansion, it is replaced by the variable value before the parser reads the statement. So in your case,
$(Must_Include='$(Arq1)');
will expand to
$(Must_Include='C:\Folder Name\QlikView\ApontamentoHoras-ScriptCarga.txt');
whereas
$(Must_Include=$(Arq1));
will expand to
$(Must_Include=C:\Folder Name\QlikView\ApontamentoHoras-ScriptCarga.txt);
You will probably want to include this expansion in quotes, since the path contains blanks. In other cases, it is better to expand it without quotes, e.g. if the variable contains a number that you want to use in a calculation.
HIC
Ótimas referências!
Obrigada pelos links Márcio.