Login Page - Create Account

Support Board


Date/Time: Mon, 25 Nov 2024 12:18:02 +0000



is it ok to put a semicolon ';' behind the SCDLLName statement?

View Count: 223

[2024-02-29 17:21:25]
User43 - Posts: 101
The example studies and documentation don't show a ; behind the SCDLLName statement.
SCDLLName("My DLL Name")
instead of
SCDLLName("My DLL Name");

In my editor seems to expect a semicolon though.
Without it the missing ; causes the editor to think that the prior statement is not closed.

Question: is it OK to put a ; behind the SCDLLName() row?
[2024-02-29 17:33:39]
User719512 - Posts: 264
What editor is this? Or is this linting rules you have set?

In c/c++, you can add semi-colons almost anywhere. So YES, adding one is perfectly fine. Also, if it compiles, a good sign, it's ok as well.

tl;dr

You could even do something like this, just to demonstrate:


;
;;; SCDLLName("123_Sample Custom Study DLL");;
;

Again, just showing semi-colon usage, not great coding patterns.
[2024-02-29 17:46:14]
User43 - Posts: 101
I'm using Emacs. With Eglot based on clangd.

And yes it appears it compiles fine, just wanted to make sure I don't miss anything.

Probably I should have phrased my question the other way around, why is the statement compiling with out the ; behind it.

Meanwhile I found that the SCDLLName is a macro, and looking up the macro its content is including the ; on two lines it represents.
So I guess that's why its working.
The macro " SCDLLName("whatever") " is replaced by its definition before the compiler gets to see it.

Maybe a bit of a lack in my Emacs config that this macro is not fully recognized.

Anyhow many thanks for your feedback.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account