Why does #Prompt, Default( %Symbol ) get processed before #Prepare #Declare( %Sym )

Found a situation where a #Prompt using a #Declare’d %symbol for its default value throws an error message like Unknown variable for %Symbol.

I thought #Prepare is supposed to be processed first before #Prompt’s?

#Prepare
#Declare( %Symbol, String )
#Set( %Symbol, 'Some Value' )
#EndPrepare
#Prompt( '', @s255 ),%PromptSym, Default( %Symbol )

Something has to be first, you seem to confirm DEFAULT() occurs before #PREPARE.

That makes sense to me as #PREPARE is:

to fix symbols to the values needed to process the #PROMPT or #BUTTON statements

Your #PREPARE should #Set( %PromptSym ,...) the Symbol used in the #PROMPT

You should confirm that literal values like DEFAULT('I am literal') are also overridden by a Prepare #Set( %PromptSym ,...)

I was trying to use #Prompt’s in a #Group and pass parameters to it, but parameters get treated as “unknown variables” throwing an error message in the #Prompt section so I’ve found out.

This is not allowed, throws unknown variable error. The group recieves the parameters, but they cant be used in a prompt statement.

#Group( %progrpPopulateData, %pParam1, %pParam2 ) 
#Prompt( 'Something, Check), %Symbol, Default( %pParam1 )

#Group( %progrpPopulateData, * %pParam1, * %pParam2 ) 
#Prompt( 'Something, Check), %pParam1, Default( %pParam2 )

This is allowed provided the Default symbol is previously declared or is a prompt symbol.

#Group( %progrpPopulateData ) 
#Prompt( 'Dct Global', Check ), %DataGlobal, Default( %PreviouslyDeclaredSymbolOrPrompt )

I would disagree with the Default() needing to be processed before #Prepare because
I cant create a generic #group with #prompt’s and use address parameters for the #Prompt symbol let along the default() symbol.

The default()'s where ever they are, beit a #procedure or #code get processed even before the #Application #Prompt %Symbols, they literally get processed first before anything else. So thats why I dont think its right.