10000 parameter with store and delete modifier · Issue #971 · pyscripter/pyscripter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

parameter with store and delete modifier #971

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tfelden opened this issue Oct 16, 2019 · 2 comments
Closed

parameter with store and delete modifier #971

tfelden opened this issue Oct 16, 2019 · 2 comments

Comments

@tfelden
Copy link
tfelden commented Oct 16, 2019

I want to use a template like this:
Start of template text>>>
## @var $[type=toBeChangedToRealType?Enter type of var] $$[varname-s=newVar?Enter variable name]
# Description of $[varname]
$[varname-d] = None
<<<End of template text
The -s (parameter modifier) will store the value in varname.
The -d will remove the value in varname after usage.
In that case one can use the identical template to declare and document a python variable in pyScripter and with doxygen.

@pyscripter
Copy link
Owner

In the fortcoming version existing syntax has been extended in the following way:

When the Parameter contains the equal sign, the its value is defined for the current session, e.g. $[proc=Test] will define the Parameter "proc" with the value "Test". Or $[proc=?Enter proc] with prompt for a value and defined the Parameter "proc" with the provided value. To remove a parameter use the equal sign without any value or question, e.g. $[proc=] will remove the parameter proc if it exists.

For example try the following in an editor.

$[proc=aaa] $[proc] $[proc] $[proc=]
$[proc=bbb?Question] $[proc] $[proc] $[proc=]

Select and press Shft+Ctrl+R (Replace Parameters)

@tfelden
Copy link
Author
tfelden commented Jan 14, 2020

I checked with version 3.6.2 the described feature as of 25.11.2019 post and it is working perfectly.
Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
0