Quote from SmnMhmdy on December 24, 2019, 10:42 pmBasically I want to know what method and technique a programming language use to find out which } (endif) is for which { (if) when they are stacked inside each other like this:
If If If Endif Endif EndifI've thought about counting them but I was wondering if there is a better way (formula, technique, method) to do it.
Basically I want to know what method and technique a programming language use to find out which } (endif) is for which { (if) when they are stacked inside each other like this:
If If If Endif Endif Endif
I've thought about counting them but I was wondering if there is a better way (formula, technique, method) to do it.

Quote from HPW on December 25, 2019, 7:52 amHello,
Since neoscript does not use () or [] or {} te best method is to use code indentation.
If If If Endif Endif EndifYou may also use extensive commenting to comment for what a endif is for.
Together with a good Editor this will let you keep control over bigger sources.
Regards
Hans-Peter
Hello,
Since neoscript does not use () or [] or {} te best method is to use code indentation.
If
If
If
Endif
Endif
Endif
You may also use extensive commenting to comment for what a endif is for.
Together with a good Editor this will let you keep control over bigger sources.
Regards
Hans-Peter

Quote from Vadim on December 25, 2019, 8:03 amHi!
Any EndIf always refers to the closest unclosed If.
In the same way, Else always refers to the closest unclosed If.
Hi!
Any EndIf always refers to the closest unclosed If.
In the same way, Else always refers to the closest unclosed If.
Uploaded files:
Quote from as3856 on December 25, 2019, 4:50 pmWhen writing code (in my opinion) it is better to avoid (if possible) multiple "If - EndIf" attachments, and use "IfEx - EndIf"
Regards
Andrei (as3856)
When writing code (in my opinion) it is better to avoid (if possible) multiple "If - EndIf" attachments, and use "IfEx - EndIf"
Regards
Andrei (as3856)
Quote from SmnMhmdy on December 26, 2019, 7:38 pmThank you @hpw @vadim @as3856 I think I actually explained it wrong. I'm working on a scripting system that needs to process If, for, while, ... arguments. The rough syntax is looking like this:
If { If{ If{ Command } } }So I'm looking for a technique to find which '}' symbol represents the end of its respective '{' symbol and therefore not executing the commands inside of them by skipping to the specific line which holds the right '}' symbol if the argument is not valid.
Thank you @hpw @vadim @as3856 I think I actually explained it wrong. I'm working on a scripting system that needs to process If, for, while, ... arguments. The rough syntax is looking like this:
If {
If{
If{
Command
}
}
}
So I'm looking for a technique to find which '}' symbol represents the end of its respective '{' symbol and therefore not executing the commands inside of them by skipping to the specific line which holds the right '}' symbol if the argument is not valid.

Quote from Vadim on December 26, 2019, 7:51 pmYou can count the number of opening brackets coming one after another. Therefore, each subsequent closing bracket will correspond to a known opening number. For example, if three opening brackets are found, then the fourth (closing) will correspond to the third (opening). The fifth bracket (closing) will correspond to the second (opening). The sixth (closing) will correspond to the first (opening).
You can also consider consecutive IF and IFEx.
You can count the number of opening brackets coming one after another. Therefore, each subsequent closing bracket will correspond to a known opening number. For example, if three opening brackets are found, then the fourth (closing) will correspond to the third (opening). The fifth bracket (closing) will correspond to the second (opening). The sixth (closing) will correspond to the first (opening).
You can also consider consecutive IF and IFEx.

Quote from HPW on December 27, 2019, 12:20 amHello,
I do not get the Point? A Scripting System inside the Scripting System?
There are several plugins offering alternative Scripting languages yet.
Regards
Hans-Peter
Hello,
I do not get the Point? A Scripting System inside the Scripting System?
There are several plugins offering alternative Scripting languages yet.
Regards
Hans-Peter
Quote from SmnMhmdy on December 27, 2019, 10:03 am@vadim Thanks I guess there's no other way than counting them.
@hpw I'm doing this mostly for educational purposes and personal and/or in-house usage. On the same note, Is there any plugin for c/c++ programming inside nb? or is it possible to write an nb plugin using those languages?
@vadim Thanks I guess there's no other way than counting them.
@hpw I'm doing this mostly for educational purposes and personal and/or in-house usage. On the same note, Is there any plugin for c/c++ programming inside nb? or is it possible to write an nb plugin using those languages?

Quote from Vadim on December 27, 2019, 11:01 amSee also the hpwControl (Hans-Peter Wickern) plugin. Maybe he will help you.
Yes, somewhere on this site there is SDK for writing plugins. Senior colleagues will direct you. You can write plugins and functions in different languages.
Some useful information can be gleaned from my article (Google will help translate it into the desired language):
https://habr.com/ru/post/451346/
See also the hpwControl (Hans-Peter Wickern) plugin. Maybe he will help you.
Yes, somewhere on this site there is SDK for writing plugins. Senior colleagues will direct you. You can write plugins and functions in different languages.
Some useful information can be gleaned from my article (Google will help translate it into the desired language):
https://habr.com/ru/post/451346/

Quote from HPW on December 27, 2019, 11:57 amHello,
In the download section are some SDK Versions:
https://visualneo.com/downloads
The most used SDK is for delphi. There are 2 Downloads. One for delphi 10 and the other for all older versions.
(Delphi was used to write VisualNeo software)
And there is a version for C#.
There were other more experimental Versions for powerbasic, purebasic, freepascal.
In theory a experienced C-Programmer should be able to write a plugin for his own.
It is a quite clear Interface spec with function-pointers and PChar parameter-strings.
Regards
Hans-Peter
Hello,
In the download section are some SDK Versions:
The most used SDK is for delphi. There are 2 Downloads. One for delphi 10 and the other for all older versions.
(Delphi was used to write VisualNeo software)
And there is a version for C#.
There were other more experimental Versions for powerbasic, purebasic, freepascal.
In theory a experienced C-Programmer should be able to write a plugin for his own.
It is a quite clear Interface spec with function-pointers and PChar parameter-strings.
Regards
Hans-Peter
Quote from SmnMhmdy on December 27, 2019, 6:03 pmThanks for the clear explanation @vadim @hpw !
I'll definitely look into the mentioned documents.
And btw counting the open brackets and subtracting the number from the closed brackets seems to have worked.
Thanks for the clear explanation @vadim @hpw !
I'll definitely look into the mentioned documents.
And btw counting the open brackets and subtracting the number from the closed brackets seems to have worked.