Re: variable substitution within quotes in braces



On May 4, 8:43 am, abhilasha21 <abhilasha21.gu...@xxxxxxxxx> wrote:
Hi All ,

I have been trying to find a way to substitute a variable within
quotes within braces..
eg : i need to pass following string as an argument to a procedure.

{<ab:max><ab:mid="xyz:abc...@xxxxxxxx"/></wyty:ert>}

I want to assign ' xyz:abc...@xxxxxxxx' to a variable say abhi.

so my string should look like :
{<ab:max><ab:mid="$abhi"/></wyty:ert>} .

Can anyone please help me to solve this trick in TCl..?

Thanks in advance ...
Abhilasha


Does this answer your question?

% set x xyz:abc123@xxxxxxxx
xyz:abc123@xxxxxxxx
% set y {<ab:max><ab:mid="$x"/></wyty:ert>}
<ab:max><ab:mid="$x"/></wyty:ert>
% set z [subst -nocommands $y]
<ab:max><ab:mid="xyz:abc123@xxxxxxxx"/></wyty:ert>

If not, maybe the following does:

% set y {{<ab:max><ab:mid="$x"/></wyty:ert>}}
{<ab:max><ab:mid="$x"/></wyty:ert>}
% set z [subst -nocommands $y]
{<ab:max><ab:mid="xyz:abc123@xxxxxxxx"/></wyty:ert>}

.



Relevant Pages

  • Re: Update existing values incrementally w/UPDATE SQL
    ... I think it would be safe to say, use the Dim statement any time you are ... Dim basically tells vba that you want to initiate a new variable. ... As far as quotes go, this was one of the trickiest ... Consider vba's interpretation of a string: ...
    (microsoft.public.access.modulesdaovba)
  • Re: Update existing values incrementally w/UPDATE SQL
    ... and in the book; Access 2007 VBA Programmer's Reference. ... As far as quotes go, this was one of the trickiest ... Consider vba's interpretation of a string: ... when an SQL is processed (I use an SQL example because it is the most ...
    (microsoft.public.access.modulesdaovba)
  • Re: Update existing values incrementally w/UPDATE SQL
    ... pretend that Me.txtString is a control on your form, ... You cant put Me.txtString inside the double quotes, or VBA just reads it as a ... and in the book; Access 2007 VBA Programmer's Reference. ... when an SQL is processed (I use an SQL example because it is the most ...
    (microsoft.public.access.modulesdaovba)
  • Re: SQL WHERE STMT PROBLEM
    ... is defined as a String variable, it is therefore not possible for it to ever ... possibly assign the value "False" to the BsSql variable. ... Dim oRst As DAO.Recordset ... > single and dbl quotes as instructed to produce the above BsSql ...
    (microsoft.public.access.queries)
  • Re: Multi Field SQL Where Clause
    ... Trying to DIM variables in a public function when the variables are already DIM'd will generate an error. ... I also struggled with creating the SQL string when I first started. ... Yes, it should have been a single quote, not three quotes. ... sysNtDvNo = sysPUOHDvNo ...
    (microsoft.public.access.forms)