Author Topic: DEBUG / RELAESE macro  (Read 1980 times)

aos

  • Community Member
  • Posts: 19
  • Hero Points: 0
DEBUG / RELAESE macro
« on: December 04, 2019, 08:31:38 am »
Hello,

What is the macro that tells me on which configuration am i?

Thanks,
Aviel.

Graeme

  • Senior Community Member
  • Posts: 2485
  • Hero Points: 325
Re: DEBUG / RELAESE macro
« Reply #1 on: December 04, 2019, 09:07:14 am »
GetCurrentConfigName  - gets the config name for the current/active project.

aos

  • Community Member
  • Posts: 19
  • Hero Points: 0
Re: DEBUG / RELAESE macro
« Reply #2 on: December 04, 2019, 09:14:36 am »
thanks, i use it with %?

where can i see all the macros that are built in in slickedit?

Graeme

  • Senior Community Member
  • Posts: 2485
  • Hero Points: 325
Re: DEBUG / RELAESE macro
« Reply #3 on: December 04, 2019, 11:22:38 am »
Some you can find with help => macro functions by category.
Also in the installation docs folder see SlickCMacroBestPractices.pdf

What do you mean you use % ??
Are you writing a Slick C macro ?
What are you trying to do?

aos

  • Community Member
  • Posts: 19
  • Hero Points: 0
Re: DEBUG / RELAESE macro
« Reply #4 on: December 05, 2019, 03:54:47 pm »
no..i'm sorry i will be more clear..

In Visual Slick Edit you provide the following Macros related to the configurations, such as:
%b  -> Expands to the "Configuration" (i.e. Debug|Win32  or Debug|x64)
%bn -> Expands to the "Configuration Name"  (i.e. Debug)

i want to know if there is a place i can see the legend of all the macros in slickedit?

Thanks,

Graeme

  • Senior Community Member
  • Posts: 2485
  • Hero Points: 325
Re: DEBUG / RELAESE macro
« Reply #5 on: December 05, 2019, 09:45:18 pm »
In the project properties dialog, in some places you can click the right arrow.

In the help - look at _parse_project_command
Code: [Select]
_str _parse_project_command(_str command, _str buf_name, _str project_name, _str cword, _str argline='', _str ToolName='', _str ClassPath='', int *recursionStatus=null, _str(*recursionMonitorHash):[]=null, int handle=0, _str config='', _str outputFile='', _str moreWordOptions='', _str moreParenOptions='')

Used to generate a compile command which needs parts of the buffer name (buf_name), the project name (project_name), or the current word (cword) inserted. The rules for substituting these parts into the command are:

%AP
The 3rd party project file name, for associated projects
%AW
The 3rd party workspace file name, for associated workspaces
%B
Configuration
%BD
Configuration build directory
%BN
Configuration name. Same as %B option except for Visual C++ configuration names where configuration names are of the form CFG="[ConfigName]" or [ConfigName]|[Platform].
%BP
Platform name from Visual C++ configuration [ConfigName]|[Platform].
%C
Current word
%CP
Java class path including -classpath.
%DEFD
Configuration defines with dashes. Example: %DEFD, project def = 'test' produces '"-Dtest"
%DEFS
Configuration defines with slashes. Example: %DEFS, project def = 'test' produces '"/Dtest"
%DM
The file name only of the current buffer.
%E
File extension with dot
%F
Absolute filename
%H
(Java only) Builds a temp HTML file to run the compiled applet, %H is replaced by the temp HTML file name.
%I
Absolute include directories (individually listed) including '-i'. Example: '-ic:\folder1 -ic:\folder2'
%IR
Relative include directories (to the project) including '-I', seperated by semicolons. Example: '-Ic:\folder1;c:\folder2'
%IN
Absolute include directories (individually listed) including '-i '. Example: '-i c:\folder1 -i c:\folder2'
%JBD
Java build directory including -d.
%LF
Current buffer name.
%LIBS
Libraries space delimited.
%N
Filename without extension or path
%O
Output filename (executable name).
%OBJS
Project objects (including libraries).
%OE
Output extension with dot
%ON
Output filename with no extension or path
%OP
Output path
%P
Path of current file
%R
Absolute project name
%RE
Project extension
%RM
Project display name (for associated workspaces).
%RN
Project filename without extension or path
%RP
Project path
%RV
(Windows only) Project drive with :
%RW
Project working directory
%T
Project configuration target
%V
(Windows Only) Drive of current file with :
%W
Absolute workspace filename
%WE
Workspace extension with dot
%WN
Workspace filename with no extension or path
%WP
Workspace path
%WV or %WD
Workspace drive with :
%WX
The workspace folder name only. Example: %WX, workspace = 'c:\a\b\c\workspace.vpw' produces 'c'.
%XUP
Translate all back slashes that follow to forward slashes (UNIX file separator)
%XWP
Translate all forward slashes to back slashes (Windows file separator)
%-#
Removes the previous # characters.
%#
The # item in argline (items are seperated by spaces).
%{*.*}
A list of project files matching the pattern in braces.
%[regkey]
Value of Windows registry entry. example: %[HKLM:\Software\Microsoft\Communicator@InstallationDirectory]
%(envvar)
Value of environment variable envvar
%(macro functionName arg1_args)
Calls a macro function with one argument (arg1_args) if there are any. Any return value is included in the build command. functionName and arg1_args are expanded before parsed. Parenthesis must match. Example: %(macro my_function %(PATH)), where my_function(_str path) is a macro function.
%(last-path-part count pathSpec)
Return one path part. Starts from end of pathSpec where count=0 is the name without path, count=1 is first path part before name, count=2 is path before that, etc. Example: %(last-path-part 1 c:\a\b\c\d\test.txt) produces 'd'. Example: %(last-path-part 2 c:\a\b\c\d\test.txt) produces 'c'
%(last-path count pathSpec)
Return number of path parts specified. Starts from end of pathSpec where count=0 returns name without path, count=1 returns first path part before name and name, count=2 returns is first and second path parts before name and name, etc. Example: %(last-path 1 c:\a\b\c\d\test.txt) produces 'd\test.txt'. Example: %(last-path 2 c:\a\b\c\d\test.txt) produces 'c\d\test.txt'
%(prompt prompt-text[: initial_value])
Prompts the user for a value. Returns user input. prompt-text and initial_value is expanded before being parsed. Parenthesis must match. Example: %(prompt text:initial value)), will prompt the user with the text 'Prompt text' with 'initial value' in the text box.
%(last-prompt-result)
Returns result from last %(prompt ...).
%(open-paren)
Returns '('. Intended for use inside a parenthesized expression which would otherwise have mismatched parenthesis.
%(close-paren)
Returns ')'. Intended for use inside a parenthesized expression which would otherwise have mismatched parenthesis.
%%
Percent character
Returns: _str

The resulting command is returned. The resulting command is returned.

Example:

          defmain()
          {
               // The message displayed is the same as 'cc -c':+p_buf_name
               message(_parse_project_command('%f',_project_current(p_buf_name),'');
          }
Category:

Miscellaneous_Functions

aos

  • Community Member
  • Posts: 19
  • Hero Points: 0
Re: DEBUG / RELAESE macro
« Reply #6 on: December 08, 2019, 08:48:39 am »
Thanks!