U++ framework
Do not panic. Ask here before giving up.

Home » Extra libraries, Code snippets, applications etc. » U++ Esc Interpreter, Esc Macros and templates » bug in Esc manual page?
Re: bug in Esc manual page? [message #2112 is a reply to message #2107] Sat, 01 April 2006 16:17 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
hojtsy wrote on Sat, 01 April 2006 07:06

In Esc manual page there is this line:
s[1, -1] = "xXx";    // s is now "1xXx4"

Is -1 the slice element count here? I supposed that it could only be positive number.
I also think that this other example has some error. How do the interpreter know in the last line that x means var1.x ?
var.x = 0;
var.Next = @() { .x++; };
var.Next();            // var.x is now 1
var1.x = 0;
var.Next()! x;            // var1.x is now 1


BTW, I tried searching for esc files in the U++ installation, to see some examples, but there seems to be none. Maybe some example files could be put in, to make the syntax and usage more straightforward. How do you use Esc in a C++ application, how are the functions are invoked, and how are the return values retrieved? Is there a connection between Esc and Usc? Usc files seems to have a different syntax than the one desribed for Esc. Is there a manual for Usc?


Documentation bugs - fixed (negative index is possible, but it should be ":" slice, and "var.Nect() ! var1" instead.

I will try to create some reference\Esc soon.

Usc / Esc relation - Usc is Esc "application" - it is using Esc interpreter as "engine", but (exactly in a Esc design direction - it is "Embeddable Script" Smile adds more syntax to it. But the actual code (in both widget descriptions and TheIDE macros) is Esc.

Mirek
 
Read Message BugQuestion.gif
Read Message
Read Message
Read Message
Read Message
Previous Topic: *.upt Empty lines produced in "Preview" - a bug?
Next Topic: REPL
Goto Forum:
  


Current Time: Tue Jun 16 15:30:59 GMT+2 2026

Total time taken to generate the page: 0.00459 seconds