[Gambas-user] [SPAM] Re: Gambas IDE locking after every syntax error encountered
No, but since when? I was short before making an upgrade, does it count? Regards Dag-Jarle Johansen Am Mittwoch, den 10.03.2010, 08:50 +1100 schrieb richard terry: Last couple of versions I've noticed this, I'll upgrade and report back, but wondered if anyone else experienceing this. Have to kill the ide and restart gambas. Richard -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Gambas IDE locking after every syntax error encountered
On Wednesday 10 March 2010 22:35:32 you wrote: No, but since when? I was short before making an upgrade, does it count? Not sure what you mean by the above, however, sometime after this version: 2754 Still happening with 2782. God knows how to sort this out, its driving me crazy. Regards Richard Regards Dag-Jarle Johansen Am Mittwoch, den 10.03.2010, 08:50 +1100 schrieb richard terry: Last couple of versions I've noticed this, I'll upgrade and report back, but wondered if anyone else experienceing this. Have to kill the ide and restart gambas. Richard - - Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Gambas IDE locking after every syntax error encountered
Am Mittwoch, den 10.03.2010, 23:51 +1100 schrieb richard terry: On Wednesday 10 March 2010 22:35:32 you wrote: No, but since when? I was short before making an upgrade, does it count? Not sure what you mean by the above, however, sometime after this version: 2754 Still happening with 2782. God knows how to sort this out, its driving me crazy. Regards Richard Regards Dag-Jarle Johansen Am Mittwoch, den 10.03.2010, 08:50 +1100 schrieb richard terry: Last couple of versions I've noticed this, I'll upgrade and report back, but wondered if anyone else experienceing this. Have to kill the ide and restart gambas. Richard Salut Richard, did you try to start from scratch ? -- Amicalement Charlie -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Ambiguous expression?
Hi! This; 1\2*3 Yields this; Ambiguous expression. Please use braces But if I write; 1/2*3 Then no problem. Why? Is this planned behaviour? Gambas 3 revision 2664 (old!) Ubuntu 9.10 64bit Jussi -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Ambiguous expression?
I really think yes. Standard symbol for fractions is /, why should you use \? -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Ambiguous expression?
1/2 = 0.5 1\2 = 0 3\2 = 1 \ operator gives only integer part. Jussi On Wed, Mar 10, 2010 at 19:48, Alessandro Rinaldi alerina...@linuxzogno.org wrote: I really think yes. Standard symbol for fractions is /, why should you use \? -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Ambiguous expression?
Wow, interesting! Didn't know it :) Thanks! So, I really don't know what's the problem, have you tried using brackets? -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Ambiguous expression?
Alessandro Rinaldi ha scritto: I really think yes. Standard symbol for fractions is /, why should you use \? Backslash is integer division, and should yeld an integer result. Slash is float division, and yelds a float number (this is Basic syntax; other languages use different methods). The expression 1\2*3 is not really ambiguous, it is only for Gambas (don't ask me why); it should be seen as take an integer number, integer-divide it for another integer number, and multiply the result for another integer number, giving an integer result. About integer division, there are other reasons apart from wanting an *integer* division: for example is faster. Regards, Doriano -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Ambiguous expression?
Alessandro Rinaldi ha scritto: I really think yes. Standard symbol for fractions is /, why should you use \? Backslash is integer division, and should yeld an integer result. Slash is float division, and yelds a float number (this is Basic syntax; other languages use different methods). The expression 1\2*3 is not really ambiguous, it is only for Gambas (don't ask me why); it should be seen as take an integer number, integer-divide it for another integer number, and multiply the result for another integer number, giving an integer result. About integer division, there are other reasons apart from wanting an *integer* division: for example is faster. Regards, Doriano I noticed that operator evaluation order differ between languages, even if they agree on most parts. So I decided to raise an error when the compiler encounters different operators having the same evaluation order weight, and when I thought that the interpreter may not do what the user thinks. By compelling the user to add brackets, I make the source code less ambiguous for another reader, so this is a good thing. But the test is not perfect, and I don't remember why I do not raise the error for 1/2*3 and I raise it for 1\2*3. Maybe because that mixing * and / is usual in mathematics, but mixing an integer division with a normal multiplication not, and I wanted to force the use of brackets. Morever, that error is actually just a warning. I can suppress it, and Gambas will just apply its operator evaluation order without telling anything. But I don't think I will do it! Regards, -- Benoît Minisini -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Ambiguous expression?
Benoît Minisini ha scritto: Alessandro Rinaldi ha scritto: I really think yes. Standard symbol for fractions is /, why should you use \? Backslash is integer division, and should yeld an integer result. Slash is float division, and yelds a float number (this is Basic syntax; other languages use different methods). The expression 1\2*3 is not really ambiguous, it is only for Gambas (don't ask me why); it should be seen as take an integer number, integer-divide it for another integer number, and multiply the result for another integer number, giving an integer result. I noticed that operator evaluation order differ between languages, even if they agree on most parts. So I decided to raise an error when the compiler encounters different operators having the same evaluation order weight, and when I thought that the interpreter may not do what the user thinks. By compelling the user to add brackets, I make the source code less ambiguous for another reader, so this is a good thing. But the test is not perfect, and I don't remember why I do not raise the error for 1/2*3 and I raise it for 1\2*3. Maybe because that mixing * and / is usual in mathematics, but mixing an integer division with a normal multiplication not, and I wanted to force the use of brackets. Perhaps this is because C has / and *, and both have a double meaning (integer and float); pascal has two separated / and DIV, and only one *. So gambas is similar to pascal. When an operator is the same on different types (integer and floats), the compiler checks the arguments of the operator to decide whether promote one of the two (and the result). In this very case, all the arguments are integer, so all the operators are integer too, and there should be no doubt. Anyway, division and multiplication have the same precedence and (probably?) same associativity. But I agree with you: by combining precedence and associativity it is easy to make up a mess, and sometimes a solution like yours is better. The C language has something like 15 or more rules, so who remembers the exact result of *pointer-- 3+1? Morever, that error is actually just a warning. I can suppress it, and Gambas will just apply its operator evaluation order without telling anything. But I don't think I will do it! Uhm... *it is* an error if the compiler refuses to compile... it would be possible to turn it in a warning (does gambas have warnings?), if only one is very sure about promoting. But gambas uses a typing scheme different from C and pascal, and automatic type conversions, so you are probably right in keeping your way. Regards, Doriano -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Question about Databases
Dear Mailing-List, I have to write a Facharbeit about Gambas + SQLite3. It won't have so much pages, I just want to describe how Gambas can manage Database-Systems which aren't installed by the user in the first chapter. And that's what where I need help: I don't knoe, how Gambas does this EXACTLY and I don't know enough about my ubuntu to find this out by myself. (Please excuse my english, I am a German student ;)) Regards, Tobi -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Ambiguous expression?
Benoît Minisini wrote: Alessandro Rinaldi ha scritto: I really think yes. Standard symbol for fractions is /, why should you use \? Backslash is integer division, and should yeld an integer result. Slash is float division, and yelds a float number (this is Basic syntax; other languages use different methods). The expression 1\2*3 is not really ambiguous, it is only for Gambas (don't ask me why); it should be seen as take an integer number, integer-divide it for another integer number, and multiply the result for another integer number, giving an integer result. About integer division, there are other reasons apart from wanting an *integer* division: for example is faster. Regards, Doriano I noticed that operator evaluation order differ between languages, even if they agree on most parts. So I decided to raise an error when the compiler encounters different operators having the same evaluation order weight, and when I thought that the interpreter may not do what the user thinks. By compelling the user to add brackets, I make the source code less ambiguous for another reader, so this is a good thing. But the test is not perfect, and I don't remember why I do not raise the error for 1/2*3 and I raise it for 1\2*3. Maybe because that mixing * and / is usual in mathematics, but mixing an integer division with a normal multiplication not, and I wanted to force the use of brackets. Morever, that error is actually just a warning. I can suppress it, and Gambas will just apply its operator evaluation order without telling anything. But I don't think I will do it! Regards, You are correct to not suppress it. The warning is correct. The actual value of the numbers is not important. The expression is ambiguous without the brackets. 5 \ (2 * 3) = 0 (5 \ 2) * 3 = 6 This is also ambiguous 5/2*3 5 / (2 * 3) = 0.8333 (5 / 2) * 3 = 7.5 Regards Les Hardy -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Ambiguous expression?
You are correct to not suppress it. The warning is correct. The actual value of the numbers is not important. The expression is ambiguous without the brackets. 5 \ (2 * 3) = 0 (5 \ 2) * 3 = 6 This is also ambiguous 5/2*3 5 / (2 * 3) = 0.8333 (5 / 2) * 3 = 7.5 This is less ambiguous, because it is commonly known that / and * are associative from left to right a * b / c = (a * b) / c. Regards, -- Benoît Minisini -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Bug: Unable to create packages
Hi I got a Stack Overflow error when trying to create packages. I think it may be related to the new combobox_click behavior (again) in the groups selection wizard when content might load into combobox. Attached is a screenshot. Gambas2 #2783 Regards, Jesus inline: Pantallazo.png-- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] menu
Hello List, I have a very basic question... when I develop my applications I'd like them to appear in the menu under a group (when installed on a machine). When I do tha packaging I'm able to set several parameters, but is it possible to create an own menu (for example myApps) and to put the different application under this menu (myApps/app1, myApps/app2, etc)? If yes, where can I specify it? The user PC is Ubuntu. Thanks, Robi -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Bug: Unable to create packages
Hi I got a Stack Overflow error when trying to create packages. I think it may be related to the new combobox_click behavior (again) in the groups selection wizard when content might load into combobox. Attached is a screenshot. Gambas2 #2783 Regards, Jesus I have fixed it in revision #2785. I will make a 2.20.2 soon for that. Regards, -- Benoît Minisini -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Interactive table
From http://gambasdoc.org/help/comp/gb.form/tableview - TableView (gb.form) This control is an editable GridView. Use the Edit method to start editing a cell. Beware that this method must be called during the Click event. The data entered by the user must be saved by implementing the Save event handler. - So, definitely TableView :) Bye -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Bug: Unable to create packages
Benoît Minisini escribió: Hi I got a Stack Overflow error when trying to create packages. I think it may be related to the new combobox_click behavior (again) in the groups selection wizard when content might load into combobox. Attached is a screenshot. Gambas2 #2783 Regards, Jesus I have fixed it in revision #2785. I will make a 2.20.2 soon for that. Regards, Thanks, now it works. Jesus -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [SPAM] Re: Ambiguous expression?
Sorry this i mathe if you have been on a highschool or a college, you would know: it's easy multiplication and diviation goes for addition and subtsraction. Gambas works like this, if you are unsure, use parantesis () regards, Dag-Jarle Johansen Am Mittwoch, den 10.03.2010, 20:20 +0100 schrieb Doriano Blengino: Benoît Minisini ha scritto: Alessandro Rinaldi ha scritto: I really think yes. Standard symbol for fractions is /, why should you use \? Backslash is integer division, and should yeld an integer result. Slash is float division, and yelds a float number (this is Basic syntax; other languages use different methods). The expression 1\2*3 is not really ambiguous, it is only for Gambas (don't ask me why); it should be seen as take an integer number, integer-divide it for another integer number, and multiply the result for another integer number, giving an integer result. I noticed that operator evaluation order differ between languages, even if they agree on most parts. So I decided to raise an error when the compiler encounters different operators having the same evaluation order weight, and when I thought that the interpreter may not do what the user thinks. By compelling the user to add brackets, I make the source code less ambiguous for another reader, so this is a good thing. But the test is not perfect, and I don't remember why I do not raise the error for 1/2*3 and I raise it for 1\2*3. Maybe because that mixing * and / is usual in mathematics, but mixing an integer division with a normal multiplication not, and I wanted to force the use of brackets. Perhaps this is because C has / and *, and both have a double meaning (integer and float); pascal has two separated / and DIV, and only one *. So gambas is similar to pascal. When an operator is the same on different types (integer and floats), the compiler checks the arguments of the operator to decide whether promote one of the two (and the result). In this very case, all the arguments are integer, so all the operators are integer too, and there should be no doubt. Anyway, division and multiplication have the same precedence and (probably?) same associativity. But I agree with you: by combining precedence and associativity it is easy to make up a mess, and sometimes a solution like yours is better. The C language has something like 15 or more rules, so who remembers the exact result of *pointer-- 3+1? Morever, that error is actually just a warning. I can suppress it, and Gambas will just apply its operator evaluation order without telling anything. But I don't think I will do it! Uhm... *it is* an error if the compiler refuses to compile... it would be possible to turn it in a warning (does gambas have warnings?), if only one is very sure about promoting. But gambas uses a typing scheme different from C and pascal, and automatic type conversions, so you are probably right in keeping your way. Regards, Doriano -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [SPAM] Re: Interactive table
Hi, I would use tableviev It is a little bit more complicated, perhaps, but it is still the most powerful control- Regards, Dag-Jarle Johansen Am Mittwoch, den 10.03.2010, 16:45 -0500 schrieb Keith Clark: I want to create a table where a user can input data into cells, and depending on the data, calculate and display values in other cells. Which would I use, GridView or TableView? Keith -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [SPAM] Cool
I wonder do you sleep at all? It is great, how you managed to make Gambas a good language, it is better then VB ever was. It is easier to use, and I think you are really a master, considering how awful it is to use QT, for example. With the best regards for a great work Dag-Jarle Johansen -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] [SPAM] Re: Ambiguous expression?
... and when operators are of equal precedence then the operators are executed left to right. Tim On 3/10/10, Dag Jarle Johansen dag.jarle.johan...@norarg.com wrote: Sorry this i mathe if you have been on a highschool or a college, you would know: it's easy multiplication and diviation goes for addition and subtsraction. Gambas works like this, if you are unsure, use parantesis () regards, Dag-Jarle Johansen Am Mittwoch, den 10.03.2010, 20:20 +0100 schrieb Doriano Blengino: Benoît Minisini ha scritto: Alessandro Rinaldi ha scritto: I really think yes. Standard symbol for fractions is /, why should you use \? Backslash is integer division, and should yeld an integer result. Slash is float division, and yelds a float number (this is Basic syntax; other languages use different methods). The expression 1\2*3 is not really ambiguous, it is only for Gambas (don't ask me why); it should be seen as take an integer number, integer-divide it for another integer number, and multiply the result for another integer number, giving an integer result. I noticed that operator evaluation order differ between languages, even if they agree on most parts. So I decided to raise an error when the compiler encounters different operators having the same evaluation order weight, and when I thought that the interpreter may not do what the user thinks. By compelling the user to add brackets, I make the source code less ambiguous for another reader, so this is a good thing. But the test is not perfect, and I don't remember why I do not raise the error for 1/2*3 and I raise it for 1\2*3. Maybe because that mixing * and / is usual in mathematics, but mixing an integer division with a normal multiplication not, and I wanted to force the use of brackets. Perhaps this is because C has / and *, and both have a double meaning (integer and float); pascal has two separated / and DIV, and only one *. So gambas is similar to pascal. When an operator is the same on different types (integer and floats), the compiler checks the arguments of the operator to decide whether promote one of the two (and the result). In this very case, all the arguments are integer, so all the operators are integer too, and there should be no doubt. Anyway, division and multiplication have the same precedence and (probably?) same associativity. But I agree with you: by combining precedence and associativity it is easy to make up a mess, and sometimes a solution like yours is better. The C language has something like 15 or more rules, so who remembers the exact result of *pointer-- 3+1? Morever, that error is actually just a warning. I can suppress it, and Gambas will just apply its operator evaluation order without telling anything. But I don't think I will do it! Uhm... *it is* an error if the compiler refuses to compile... it would be possible to turn it in a warning (does gambas have warnings?), if only one is very sure about promoting. But gambas uses a typing scheme different from C and pascal, and automatic type conversions, so you are probably right in keeping your way. Regards, Doriano -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Tim Koeller -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Question about Databases
There's a backend driver gambas2-gb-db-sqlite, which communicates with the sqlite3 driver. You have to specify the Host (folder of the target database file), Name (of the file itself) and Type (which is sqlite) and also a Password if you need some. The details under the hood? I don't know. You have to prepare a querry text and to pass it to Database.Exec function as argument. What is difficult: you have some forbidden characters like ~?', which may not be parts of the search pattern. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user