If-Else Statement

NppExec
2012-12-29
2013-08-21
  • Hello, guys I'm trying to write some script that will compile my program and directly upload it to MCU, in that I came across the corner case, is there any if-else statement available in nppexec which I can use to compare variable value.

    Thanks A lot.

     
  • DV
    DV
    2012-12-29

    Refer to NppExec Manual, section . It mentions "pseudo-conditions in NppExec".

     
  • DV
    DV
    2013-04-17

    NppExec v0.5.

     
  • PAC
    PAC
    2013-08-21

    An example:
    cd $(CURRENT_DIRECTORY)
    IF $(EXT_PART)==.cpp GOTO CPP
    IF $(EXT_PART)==.cs GOTO CSHARP
    IF $(EXT_PART)==.py GOTO PYTHON
    ELSE GOTO EXITSCRIPT

    :CPP
    g++ -o result $(FILE_NAME)
    ping -n 2 127.0.0.1
    result.exe
    GOTO EXITSCRIPT

    :CSHARP
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe /out:result.exe /doc:resultDoc.xml $(FILE_NAME)
    ping -n 2 127.0.0.1
    result.exe
    GOTO EXITSCRIPT

    :PYTHON
    python $(FILE_NAME)
    GOTO EXITSCRIPT

    :EXITSCRIPT