Login Page - Create Account

Support Board


Date/Time: Sat, 04 May 2024 06:20:20 +0000



[Programming Help] - cpp / ACSIL: local function definitions are illegal

View Count: 932

[2019-11-10 08:17:30]
T44 - Posts: 363
It seems the ACSIL code which users create runs within main().
Is there a supported way for users to create functions within ACSIL?
I can't find anything in the ACSIL documentation about this.
[2019-11-10 12:41:18]
User907968 - Posts: 802
This 'local function definitions are illegal' suggests that your function definitions are within your study function code block.

Assuming that your code is contained within one source file and that is the only place you wish to use your custom function, then you should do one of the following -

1) Declare the function prototype before your study function and then include the full definition below
or
2) Include the full function definition before your study function.

Here is some information for you -

Advanced Custom Study Interface and Language (ACSIL): C++ References
C++ Functions

You could look at 'RequestValuesFromServerAndDraw.cpp' within the sierrachart/acssource folder on you machine for an example of option 1 above.

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

Login

Login Page - Create Account