Thanks for the solutions.  Below is the code that I'm using.  I went with the 
GETPROPERTY version because it appears that it already respects the standard 
double-quote syntax for single arguments that contain white space.  The code 
below allows me to use the shortcut MyApp.EXE -DEBUG "EDIT USING BigMenu" and 
MyApp.EXE -DEBUG "EDIT USING SmallMenu" to start the application with different 
forms.  (It would also work without the double quotes, aggregating all the 
individual arguments into a space-separate startup command).
SET VAR tStartupCommand TEXT = NULLSET VAR tParamCount INT = 1WHILE 1 = 1 THEN
  SET VAR tParamSearch = ('STARTUPPARAMSTR' + CTXT(.tParamCount))  GETPROPERTY 
APPLICATION &tParamSearch 'tParamValue'
  IF tParamValue IS NULL OR tParamValue = '-ERROR-' THEN    BREAK  ENDIF
  SET VAR tParamCount = (.tParamCount + 1)
  IF tParamValue IN ('-D', '-Debug') THEN    SET DEBUG ON  ELSE    SET VAR 
tStartupCommand = (.tStartupCommand & .tParamValue)  ENDIF
ENDWHILECLEAR VAR tParamCount, tParamSearch, tParamValue
 

    On Sunday, March 12, 2017 1:44 PM, Michael Byerley <[email protected]> 
wrote:
 

 
The significant difference is that you MUST know the position of the string you 
are relating to in the startup string.  
Getting the whole string and parsing it yourself affords you the luxury of 
adding to or deleting from the string with only having to deal with a 
conditional statement to accommodate the change.
If the conditional statement would be encapsulated within a stored procedure, 
there would likely only be one place that would require maintenance other than 
the particular place the conditional statement was directed.
RBase certainly gives you the ability to choose what suits you best though.


On Sunday, March 12, 2017 at 12:57:44 PM UTC-4, Michael Byerley wrote:
This was started by Larry Lustig in the previous thread.
This code segment could be placed anywhere relative to its purpose.Function 
declarations ONLY need to be done ONCE in an RBase session.Once declared, the 
DLCall rbase function can be used anywhere, anytime in an RBase session.

{Begin Code}

{ Original Win32 Function Declaration: LPTSTR WINAPI GetCommandLine(void);}
-- How to declare function in RBase:

IF (CHKFUNC('GetCommandLine')) = 0 THEN  STDCALL FUNCTION 'GetCommandLineA' 
alias 'GetCommandLine' () : TEXTENDIF

SET VAR vText TEXT = NULL
SET VAR vText = (DLCALL('Kernel32', 'GetCommandLine'))
PAUSE 2 USING .vText
RETURN
{End Code}
-- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.


   

-- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to