Commit graph

114 commits

Author SHA1 Message Date
gambas
1609a6c60a Fix automatic conversion of multi-dimensional arrays.
[INTERPRETER]
* BUG: Fix automatic conversion of multi-dimensional arrays.
2021-02-10 19:20:43 +01:00
gambas
5c8f4e1b68 Really fix compilation on 32-bits systems.
[INTERPRETER]
* BUG: Really fix compilation on 32-bits systems.
2021-02-10 15:20:04 +01:00
gambas
8ef319b7cc Fix string array search with special comparisons.
[INTERPRETER]
* BUG: Fix string array search with special comparisons.
2021-02-10 15:18:01 +01:00
gambas
072101e02a Fix compilation on 32-bits systems.
[INTERPRETER]
* BUG: Fix compilation on 32-bits systems.
2021-02-10 14:48:14 +01:00
gambas
e7898916e9 Replace the Array.Sorted property by explicit FindSorted(), ExistSorted()... methods.
[INTERPRETER]
* BUG: Replace the Array.Sorted property by explicit FindSorted(), ExistSorted()... methods.
2021-02-09 23:36:09 +01:00
gambas
0fd80f690d Array.Sorted is a new property that makes the Find() and Exist() methods use a binary search algorithm. In other words, it tells the interpreter that the array is sorted.
[INTERPRETER]
* NEW: Array.Sorted is a new property that makes the Find() and Exist() methods use a binary search algorithm. In other words, it tells the interpreter that the array is sorted.
* BUG: Object[].Find() now correctly takes the optional 'Start' argument in account.
2021-02-09 20:28:58 +01:00
gambas
95572fb040 Fix multi-dimensional arrays management.
[INTERPRETER]
* BUG: Fix multi-dimensional arrays management.
2021-02-09 02:19:39 +01:00
gambas
15135fe60b Raise a memory error if the size of an array element overflows. The maximum size is now 16 MB minus one byte.
[INTERPRETER]
* BUG: Fix initialization of multi-dimensional array.
* NEW: Raise a memory error if the size of an array element overflows. The maximum size is now 16 MB minus one byte.
2021-02-08 22:08:15 +01:00
gambas
991695e493 Array access is now about 15% faster.
[INTERPRETER]
* OPT: Array access is now about 15% faster.
2021-02-08 21:45:29 +01:00
gambas
1e22281d4d Add GB.String.Split() API. GB.Array.Get() does not check array bounds anymore.
[INTERPRETER]
* NEW: Add GB.String.Split() API.
* OPT: GB.Array.Get() does not check array bounds anymore.
2021-01-21 02:32:06 +01:00
gambas
3d956c269c '_read' and '_write' are two new special methods that allow to make any object serializable by the READ and WRITE instructions.
[INTERPRETER]
* NEW: '_read' and '_write' are two new special methods that allow to make any object serializable by the READ and WRITE instructions.
* NEW: Rename macro that convert a Gambas stream object to the internal stream structure and add a macro that does the reverse conversion.
2019-12-21 17:03:42 +01:00
gambas
b092a95132 Fix static array management.
[COMPILER]
* BUG: Allow static arrays to be used with the point operator.

[INTERPRETER]
* BUG: Fix static array management. They are not read-only anymore. Only methods that want to modify the size of the array are forbidden, as well as the ReadOnly property.
2019-11-30 06:29:17 +01:00
gambas
b02810d025 Fix Find() method on Float, Single, and Long arrays.
[INTERPRETER]
* BUG: Fix Find() method on Float, Single, and Long arrays.
2019-11-09 11:34:43 +01:00
gambas
f08ce22cdc Fix support of read-only arrays.
[INTERPRETER]
* BUG: Read-only arrays are now really read-only.

[GB.JIT]
* BUG: Support for read-only arrays.
2019-09-26 14:25:37 +02:00
gambas
b11d422c14 Array.ReadOnly is a new property that make an array read-only. Once set, the property cannot be unset.
[INTERPRETER]
* NEW: Array.ReadOnly is a new property that make an array read-only. Once set, the property cannot be unset.
* NEW: The "Embedded array" error message has been rewritten as "Read-only array".
* NEW: Add two new standard errors: "Multidimensional array" and "Unknown class".
* NEW: Replace some specific error messages by standard errors.
2019-07-31 00:20:13 +02:00
gambas
2bb7d795b7 Fix Array.Shuffle() on String, Long and Object arrays.
[INTERPRETER]
* BUG: Fix Array.Shuffle() on String, Long and Object arrays.
2019-03-20 19:39:56 +01:00
gambas
a6eb422756 Array.Shuffle() is a new method that randomly shuffles an array using Fisher–Yates algorithm.
[INTERPRETER]
* NEW: Array.Shuffle() is a new method that randomly shuffles an array using Fisher–Yates algorithm.
2019-03-20 15:08:16 +01:00
gambas
209a8faacf Fix SortUsing() methods public declaration.
[INTERPRETER]
* BUG: Fix SortUsing() methods public declaration.
2019-03-08 21:51:27 +01:00
gambas
f38f1b1657 Variant[].Sort() and Variant[].SortUsing() methods have been added and SortUsing() methods now take an optional sort mode as second argument.
[INTERPRETER]
* NEW: Variant[].Sort() and Variant[].SortUsing() methods have been added.
* NEW: SortUsing() methods now take an optional sort mode as second argument.
2019-03-08 21:42:33 +01:00
gambas
d668dadcf5 Array.SortUsing() is a new method that sorts an array according to the sort order defined by another array.
[INTERPRETER]
* NEW: Array.SortUsing() is a new method that sorts an array according to the sort order defined by another array.
2019-03-06 03:55:48 +01:00
gambas
9726b53bb3 Add First and Last read-write properties to arrays.
[INTERPRETER]
* NEW: Add First and Last read-write properties to arrays.
2018-11-09 00:06:20 +01:00
gambas
09a0573e61 Replace my old sourceforge mail address by the new one.
[CONFIGURATION]
Replace my old sourceforge mail address by the new one.
2018-02-12 02:53:46 +01:00
gambas
9519c3dc52 Implement string comparison based on MATCH operator with the gb.Match constant.
[INTERPRETER]
* NEW: gb.Match is a new constant that indicates a string comparison using the PCRE MATCH operator.
* BUG: The gb.Descent flag could be erased when sorting objects implementing the '_compare' special method.
2017-10-21 01:19:27 +02:00
gambas
2953ea8d85 Fix error management that could lead to other potential crashes.
[INTERPRETER]
* BUG: Fix error management that could lead to other potential crashes.
2017-09-28 02:05:43 +02:00
Benoît Minisini
b225eba20f [CONFIGURATION]
* NEW: Update copyright year in all source files.


git-svn-id: svn://localhost/gambas/trunk@8056 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2017-01-13 03:29:42 +00:00
Benoît Minisini
5a99bd0f7b [INTERPRETER]
* BUG: Fix multi-dimensional arrays size check.


git-svn-id: svn://localhost/gambas/trunk@7233 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2015-08-22 11:04:14 +00:00
Benoît Minisini
eaf08bce5e [INTERPRETER]
* BUG: Correctly detect too large arrays.
* BUG: Array allocation incrementation now cannot be larger then 256 slots.


git-svn-id: svn://localhost/gambas/trunk@7232 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2015-08-21 18:49:33 +00:00
Benoît Minisini
48615ab311 [INTERPRETER]
* BUG: Array.Resize() now correctly raises an error if its argument is
  negative.


git-svn-id: svn://localhost/gambas/trunk@7231 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2015-08-21 00:40:14 +00:00
Benoît Minisini
5bd7b96a66 [DEVELOPMENT ENVIRONMENT]
* NEW: Profiler window: Add a new column for the average self time.

[INTERPRETER]
* OPT: Make faster implementations of the Find() and Exist() methods of the
  native array classes. Only Date[] and Variant[] use the old implementations.

[GB.FORM.EDITOR]
* BUG: TextEditor: Inserting and removing lines now work correctly when 
  wrap mode is enabled.
* OPT: TextEditor: Drawing and layouting optimizations.


git-svn-id: svn://localhost/gambas/trunk@7123 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2015-06-08 15:52:18 +00:00
Benoît Minisini
03cd222bb8 [DEVELOPMENT ENVIRONMENT]
* NEW: Software farm: Software now can be safely installed or removed. The
  source checksum is checked, as well as the required components. Libraries
  and dependencies on other software are not yet taken into account. A
  '*.desktop' file is automatically created on installation now.

[INTERPRETER]
* NEW: Split() has a new behaviour when its escape argument has two 
  characters, the second one being the first splitting character. It uses
  the first character to escape splitting characters. For example,
  Split("a;b~;c;d",";","~;") returns ["a","b;c","d"].
* NEW: String[].Join() method handle the new Split syntax. 
  ["a","b;c","d"].Join(";","~;") returns "a;b~;c;d". Moreover, in the
  traditional escape syntax, the joined string are not escaped anymore if 
  they are void.

[GB.DESKTOP]
* NEW: DesktopFile.MimeTypes is a new property corresponding to the 
  'MimeType' entry of the '*.desktop' file.
* NEW: DesktopFile now can be used for creating or modifying '*.desktop' 
  files.


git-svn-id: svn://localhost/gambas/trunk@6689 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2014-11-30 00:30:32 +00:00
Benoît Minisini
e4cd9bce1b [DEVELOPMENT ENVIRONMENT]
* BUG: Some fixes in the software farm window.

[INTERPRETER]
* NEW: Remove the GB.UnrefKeep() interpreter API, as it is not used 
  anymore.


git-svn-id: svn://localhost/gambas/trunk@6676 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2014-11-24 12:43:57 +00:00
Benoît Minisini
7abbd5e799 [DEVELOPMENT ENVIRONMENT]
* BUG: Don't check conflict on project configuration file if that files 
  does not exist.

[INTERPRETER]
* OPT: Move the string splitting routine in its own file and optimize it.

[INFORMER]
* BUG: Remove unneeded parenthesis on a test.

[GB.CLIPPER]
* BUG: Remove an unused variable.

[GB.DESKTOP]
* BUG: Fix error message in DesktopMime.

[GB.FORM]
* BUG: MaskBox: Raise the Change event after moving the cursor, so that it 
  behaves exactly like a TextBox.

[GB.FORM.MDI]
* NEW: Workspace: Count the number of detached windows so that the "detach 
  current tab" menu entry is disabled when needed.

[GB.GTK]
* BUG: Window.Utility should work even if the window is mapped now.

[GB.GTK3]
* BUG: Window.Utility should work even if the window is mapped now.

[GB.NET.PO3]
* NEW: Add a void constructor to the Pop3Client class for the 
  documentation.


git-svn-id: svn://localhost/gambas/trunk@6285 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2014-05-23 11:52:04 +00:00
Benoît Minisini
2daefc5fa0 [INTERPRETER]
* BUG: Fix maximum number of array declaration in the same class.
* NEW: Array and Collection constructor operator [ ... ] now can take any 
  number of arguments. It is only limited by the maximum function size, 
  which leads for example to about 32000 elements for a short array.


git-svn-id: svn://localhost/gambas/trunk@6110 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2014-01-27 23:46:37 +00:00
Benoît Minisini
c9ca5ab982 [CONFIGURATION]
* NEW: Update copyright year to 2013.

[GB.FORM]
* NEW: ImageView is a new control that allows to view an image inside a 
  scrolled view, at different zoom levels.
* BUG: FileProperties now works correctly if 'gb.desktop' is not used.
* NEW: The FileProperties preview tab now uses an ImageView control and has
  a toolbar to zoom the preview.
* BUG: Add the 'linux' and 'gnu' icon in the stock icon list.


git-svn-id: svn://localhost/gambas/trunk@5770 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2013-08-03 15:38:01 +00:00
Benoît Minisini
165be4a66a [INTERPRETER]
* NEW: Clean up object referencement macros.


git-svn-id: svn://localhost/gambas/trunk@5601 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2013-03-30 13:51:10 +00:00
Benoît Minisini
ca7856bf80 [INTERPRETER]
* NEW: Clean up allocation macros.

{GB.EVAL.HIGHLIGHT]
* NEW: Add 'transition' to the CSS keywords.


git-svn-id: svn://localhost/gambas/trunk@5599 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2013-03-29 23:33:01 +00:00
Benoît Minisini
53d4d9c752 [INTERPRETER]
* BUG: Fixes of bugs detected by Coverity Scan.
* BUG: Process output is correctly flushed at process exit now.

[COMPILER]
* BUG: Fixes of bugs detected by Coverity Scan.

[ARCHIVER]
* BUG: Fixes of bugs detected by Coverity Scan.

[INFORMER]
* BUG: Fixes of bugs detected by Coverity Scan.

[GB.COMPRESS]
* BUG: Fixes of bugs detected by Coverity Scan.

[GB.DEBUG]
* BUG: Fixes of bugs detected by Coverity Scan.

[GB.EVAL]
* BUG: Fixes of bugs detected by Coverity Scan.

[GB.IMAGE]
* BUG: Fixes of bugs detected by Coverity Scan.

[GB.IMAGE.EFFECT]
* BUG: Fixes of bugs detected by Coverity Scan.

[GB.VB]
* BUG: Fixes of bugs detected by Coverity Scan.


git-svn-id: svn://localhost/gambas/trunk@5493 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2013-01-06 16:13:31 +00:00
Benoît Minisini
e51fc2d951 [INTERPRETER]
* NEW: The RAISE instruction now can raise events defined in a parent 
  class.
* NEW: Timer: The Trigger method now does nothing if there is an already
  pending trigger. This behaviour is not backward-compatible, so it may be
  removed if problems arise.

[COMPILER]
* NEW: The RAISE instruction now can raise events defined in a parent 
  class.

[GB.DRAW]
* NEW: Implement standard operators in Point and PointF classes.
* NEW: Automatic conversion between Point and PointF.
* NEW: 'CDraw.c' and 'CDraw.h' source files have been renamed as 'cdraw.c' 
  and 'cdraw.h'.
* NEW: Rect.Center() and RectF.Center() are two new methods that return the 
  center of the rectangle.

[GB.FORM]
* NEW: FileChooser: tar archives now can be uncompressed. 


git-svn-id: svn://localhost/gambas/trunk@5359 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-11-24 18:52:11 +00:00
Benoît Minisini
588e0f3942 [DEVELOPMENT ENVIRONMENT]
* BUG: Fix scrolling of code editor procedure list.
* BUG: Automatic local variable declaration now works correctly when a 
  method named "Get" is called inside the analyzed expression.

[COMPILER]
* NEW: "[]" now is compiled to return a array with no elements.

[INTERPRETER]
* BUG: Array with no elements can be casted to any other array datatype.

[GB.GUI.BASE]
* BUG: Fix visibility of expanded TreeView items.

[GB.QT4.EXT]
* NEW: When the Editor loses the focus, it does not scroll to the cursor 
  position automatically anymore.


git-svn-id: svn://localhost/gambas/trunk@5266 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-10-30 23:44:24 +00:00
Benoît Minisini
fedc591dfc [INTERPRETER]
* BUG: Implicit array conversion now correctly preserves dimensions.


git-svn-id: svn://localhost/gambas/trunk@5237 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-10-14 10:52:02 +00:00
Benoît Minisini
1a031869d0 [INTERPRETER]
* NEW: Implement Variant comparison routine.
* NEW: Variant[] now has an Exist() and a Find() method.


git-svn-id: svn://localhost/gambas/trunk@5098 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-08-29 20:56:13 +00:00
Benoît Minisini
fa552f69c1 [DEVELOPMENT ENVIRONMENT]
* NEW: New gb.complex component

[INTERPRETER]
* BUG: Automatic array conversion now works with not yet loaded array 
  classes.

[GB.COMPLEX]
* NEW: New component that implements a rudimentary management of complex 
  numbers. This component is automatically loaded if a complex number
  constant is encountered and no loaded component can already handle 
  complex numbers.


git-svn-id: svn://localhost/gambas/trunk@4924 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-09 15:37:42 +00:00
Benoît Minisini
fc1c1e5531 [INTERPRETER]
* NEW: When converting an instance of A to the class B, try the conversion 
  interface of A first. If A has no conversion interface, or if it cannot 
  handle the B class, then try the conversion interface of B if any.

[GB.GSL]
* NEW: Vector class has been implemented.

[GB.JIT]
* NEW: SPEC_CONVERT constant has been replaced by a field in the CLASS 
  structure.


git-svn-id: svn://localhost/gambas/trunk@4916 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-08 20:08:43 +00:00
Benoît Minisini
ef37065297 [INTERPRETER]
* BUG: Correctly raise an error when trying to use NULL on classes 
  implementing the _operators interface.
* NEW: The _convert interface now must handle conversions from any 
  datatype.

[GB.GSL]
* NEW: Automatic conversion from numbers to Complex.
* NEW: Start implementating the Vector class.


git-svn-id: svn://localhost/gambas/trunk@4913 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-08 16:55:35 +00:00
Benoît Minisini
7bd330aa00 [INTERPRETER]
* NEW: "_operators" is a new interface that allows any native class to be
  used with most of arithmetic operators: +, -, *, /, Abs, =, <> at the 
  moment.
* NEW: The "_convert" interface now allows a class to be converted to any
  datatype, not just other classes.
* NEW: Str() and Print uses the "_convert" interface to print a localized
  string conversion of any object.

[GB.GSL]
* NEW: Use the new "_operators" interface so that complex numbers can be 
  handled by standard arithmetic operators.
* NEW: The Complex class now implements the "_convert" interface.


git-svn-id: svn://localhost/gambas/trunk@4908 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-08 14:35:58 +00:00
Benoît Minisini
91556cac06 [DEVELOPMENT ENVIRONMENT]
* NEW: The debug window has a button to switch between "normal view" and 
  "symbol view". In "normal view", array and collection contents are
  displayed. If the object is not an array or a collection, then all
  non-hidden symbols are displayed. In "symbol view", all objects symbols 
  are displayed, whatever the object type is.

[INTERPRETER]
* NEW: The debugger now can display collection-like objects. An object can 
  be displayed like a collection if it has a Count property, is enumerable,
  has a _get special method taking a string, and has a Key property that 
  returns the key of the last enumerated element.

[GB.DEBUG]
* NEW: The debugger now can display collection-like objects. An object can 
  be displayed like a collection if it has a Count property, is enumerable,
  has a _get special method taking a string, and has a Key property that 
  returns the key of the last enumerated element.

[GB.FORM]
* BUG: GridView.Clear resets the height of all rows to the default value.


git-svn-id: svn://localhost/gambas/trunk@4558 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-03-17 02:05:31 +00:00
Benoît Minisini
4e3a714642 [INTERPRETER]
* BUG: Terminal emulation now does not automatically convert NL to CR+NL.
* BUG: Fix the declaration of custom array classes.

[GB.GTK]
* BUG: Stopping a file descriptor watch now correctly check if the event 
  loop must be exited.


git-svn-id: svn://localhost/gambas/trunk@4398 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-01-13 08:04:11 +00:00
Benoît Minisini
dd3b512daf [CONFIGURATION]
* NEW: Update copyrights.


git-svn-id: svn://localhost/gambas/trunk@4384 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-12-31 02:39:20 +00:00
Benoît Minisini
546bc7a4f4 [INTERPRETER]
* BUG: Calling native methods on an anonymous reference now correctly casts 
  the return value to a Variant.
* BUG: Remove all Array class methods that break the inheritance rules.

[GB.GTK]
* BUG: Fix initial position of windows so that window manager constraints 
  are not overrided.

[GB.SETTINGS]
* BUG: Fix the use of Array class.


git-svn-id: svn://localhost/gambas/trunk@4361 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-12-29 21:47:41 +00:00
Benoît Minisini
717ab7fe77 [INTERPRETER]
* BUG: Fix _get, _next and Pop methods in the Array class.


git-svn-id: svn://localhost/gambas/trunk@4360 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-12-29 17:00:57 +00:00