News:

;) This forum is the property of Proton software developers

Main Menu

We need a way to leave the procedure in the code.

Started by atomix, Sep 20, 2022, 08:03 AM

Previous topic - Next topic

atomix

For example, if one could write (Symbol #REQ = 1) and the procedure remains in the code even if there are no calls to it.

Proc my_task(value as Byte)
    Symbol #REQ = 1                      ' compiler create internal symbol -> my_task#REQ = 1
    Task_Begin

        PRODL = 0
        OS_Yield

    Task_End
EndProc

It would be great if Les would agree to implement it!


RGV250

Hi,
I have to ask Why, what would be the point?

You could always use a subroutine if you wanted stuff left in that is not used.

Bob

top204

#2
I'm busy adding a new declare for Positron8 and Positron16 for your request, to make a procedure remain in the code, regardless if it is called or not.

Its syntax will be:

Declare Proc_Enable _CPROC_ Procedure Name

I can see it being useful sometimes if the procedure is used for a compiler library call replacement, so it needs to be enabled if a "compiler library replacement" library file is loaded into the program.

The double quote character anomaly you posted earlier is the preprocessor not handling the "\"" pre-characters for a double quote, and I do not want to re-write the preprocessor at this time, so I will be removing it from the manuals, and the value 34 will need to be used instead of the double quotes character.