New APL+Win Features

Do you know all APL+Win enhancements since APL+Win v3?
Are you using all the new features available in your APL+Win interpreter?
Check the APL+Win New Features database and become a better APL+Win Developer!
You can now Search on a specific APL+Win version (i.e. enter: 10 or 18.1 for example in the Search Text box)

Category:
Search Text (case insensitive; enter a string and press Enter):

Description

A ⎕lock of an associated function caused abnormal termination in APL+Win 10 and newer versions. More details...

Description

With support for EnableSSE2 enabled, floating point division operation could cause the session to suspend (hang) if the divisor is a vector of two or more elements, the vector contains at least one 0 and any one of the 0s is preceded by a non-zero element.

Example

      (0.2 0.3) ÷ (0.1 0)
More details...

Description

The Enclose operation was updated to avoid a potential crash arising from the following two conditions:
  1. A workspace corruption during a workspace compaction
  2. A memory leak during a report of a WS FULL (workspace full) condition
More details...

Description

Support for EnableSSE2 is production ready starting with APL+Win v19.0.01 and easily controlled in the APLW.INI configuration file setting below (note the section name change from [Experimental] to [Config]):

      [Config]
EnableSSE2=value

When value is set to 0 (still the default value), the previous behaviour of APL+Win will apply.

When value is set to 1, when appropriate, the APL+Win interpreter will use the SSE2 instruction set to optimize array-based arithmetic operations: + - × ÷.
Refer to the DEMO_SSE2.W3 workspace included in this release to test this enhancement.

Why is SSE2 disabled by default?

SSE2 floating point arithmetic operations: + - × ÷ can yield results that are very slightly different than traditional APL+Win result values. In most cases results will be identical. But in some cases very slight rounding differences can cause the low-order bits of the result value to be different. These possible result differences are limited to the last digit of precision in APL+Win and may not be apparent unless ⎕ct is set sufficiently small or ⎕pp is set sufficient high. However, you should be aware that result values may not be exactly the same with and without using the SSE2 optimization, even though you are unlikely to notice this difference with default ⎕ct and ⎕pp settings.

More details...

Description

In APL+Win v19.0.01, the saved workspace version number reported by ⎕sys[20] is the integer value 55.

Example

      )save
C:\USERS\...\ZOBJECTS\ZOBJECTS SAVED 5/25/2020 12:43:28 PM

      ⎕sysver
19.0.01  Apr 16 2019 16:07:57  Win/32

      ⎕sys[20]
55
More details...

Description

The new ⎕tt returns the number of ticks since the start of the current session.

Together with the new ⎕tf System Function, they aid in computing timing information for an APL function. An advantage of using the higher resolution ⎕tt timer rather than ⎕ai to capture timing information, ⎕tt gives a better idea of what's actually happening on really fast execution runs. The ⎕ai timer is only accurate to within about 1/1000 second while the ⎕tt timer has a resolution of 3312526 ticks per second. That makes the accuracy of ⎕tt run more accurate by a factor of about 3312 times more than ⎕ai[2].

Dividing ⎕tt by ⎕tf, the result will be the elapsed time in seconds since the APL+Win session started; basically the same value as ⎕ai[2] but without the added overhead of computing the other elements of ⎕ai and without the need to extract the second element of ⎕ai to access the time information.

      ⎕pp←17

      ⎕tt
32937472496

      ⎕ai[2]
3299.959

      ⎕ai[2] ⋄ ⎕tt÷⎕tf
3323.529
3323.5890974

      ⎕ai[2] ⋄ ⎕tt÷⎕tf
3326.18
3326.2245933

      ⎕ai[2] ⋄ ⎕tt÷⎕tf
3328.163
3328.2074221

      ⎕ai[2] ⋄ ⎕tt÷⎕tf
3330.43
3330.4740437

The following example uses a small utility called XTime to measure the execution time of an APL expression and compares execution time measured by ⎕ai[2] to execution time measures by ⎕tt/⎕tf: the second is much more accurate and more consistent.

.

Example

    ∇ XTime a;b;⎕io
[1]   ⎕io←1
[2]   b←⎕ai[2] ⋄ ←⍎a ⋄ ⎕←⎕ai[2]-b
[3]   b←⎕tt ⋄ ←⍎a ⋄ ⎕←⎕tf÷⍨⎕tt-b
    ∇

      XTime'⌹?30 30⍴10000'
0
0.0002204

      XTime'⌹?30 30⍴10000'
0.001
0.0002073

      XTime'⌹?30 30⍴10000'
0
0.0002024

      XTime'⌹?30 30⍴10000'
0.0009999999997
0.0001948

      XTime'⌹?30 30⍴10000'
0.001
0.0002185

      XTime'⌹?30 30⍴10000'
0.001
0.000208

      XTime'⌹?30 30⍴10000'
0
0.000198

      XTime'⌹?30 30⍴10000'
0.001
0.0001959
More details...

Description

The ⎕tf System Function returns the frequency of the performance counter in terms of ticks.

Together with the new ⎕tt System Function, they aid in computing timing information for an APL function. An advantage of using the higher resolution ⎕tt timer rather than ⎕ai to capture timing information, ⎕tt gives a better idea of what's actually happening on really fast execution runs. The ⎕ai timer is only accurate to within about 1/1000 second while the ⎕tt timer has a resolution of 3312526 ticks per second. That makes the accuracy of ⎕tt run more accurate by a factor of about 3312 times more than ⎕ai[2].

Dividing ⎕tt by ⎕tf, the result will be the elapsed time in seconds since the APL+Win session started; basically the same value as ⎕ai[2] but without the added overhead of computing the other elements of ⎕ai and without the need to extract the second element of ⎕ai to access the time information.

      ⎕tf
10000000

The following example uses a small utility called XTime to measure the execution time of an APL expression and compares execution time measured by ⎕ai[2] to execution time measures by ⎕tt/⎕tf: the second is much more accurate and more consistent.

.

Example

    ∇ XTime a;b;⎕io
[1]   ⎕io←1
[2]   b←⎕ai[2] ⋄ ←⍎a ⋄ ⎕←⎕ai[2]-b
[3]   b←⎕tt ⋄ ←⍎a ⋄ ⎕←⎕tf÷⍨⎕tt-b
    ∇

      XTime'⌹?30 30⍴10000'
0
0.0002204

      XTime'⌹?30 30⍴10000'
0.001
0.0002073

      XTime'⌹?30 30⍴10000'
0
0.0002024

      XTime'⌹?30 30⍴10000'
0.0009999999997
0.0001948

      XTime'⌹?30 30⍴10000'
0.001
0.0002185

      XTime'⌹?30 30⍴10000'
0.001
0.000208

      XTime'⌹?30 30⍴10000'
0
0.000198

      XTime'⌹?30 30⍴10000'
0.001
0.0001959
More details...

Description

zREngine v2.15 is a brand new version of zREngine with a brand new entirely rewritten DLL now called LC.REngine.dll. This version allows you to fully use R from APL+Win applications: its characteristics are: • use all of the R language from APL+Win • programmatically load and use R packages • display any kind of R charts in APL forms (including ggplot2 charts) • execute any R expression or set of R expressions from APL and get the results in APL Additionally, this new version includes only one DLL, is much faster to load, does no longer use the APL CSE system, does no longer create graphics files on disk when displaying R charts in an APL form, creates better vector (Metafile) graphics, can be used to display as many simultaneous APL form with R charts as desired, including in APL MDI applications. See: More details...

Description

The new onXCellDropWindow event handler in the APL Grid control is similar to the onXCellDropDown event except it fires immediately before the dropdown window and includes the window handle that is about to be displayed. In the handler, it is possible to reposition the dropdown window during this event via the ⎕WCALL'MoveWindow' Windows API. Or it can suppress the display of the dropdown window by calling the ⎕WCALL'DestroyWindow' Windows API on the Hwnd argument (⎕WARG[3]). If the window handle is destroyed, the cell does not try displaying a dropdown list. But the application is free to display a surrogate dropdown list if it chooses to do so, in order to get more control over what is displayed. More details...

Description

The new value, 256, added to the gridoptions property in the APL Grid ActiveX control to enable the dropdown window for a combo style cell (xCellType=1) to extend (up and down directions) past the borders of the APL Grid control. More details...

Description

The APL+Win system executable files (APLW.EXE and APLWR.EXE) and system DLLs are signed with the SHA-256 certificate. More details...

Description

The APL+Win Grid has been adapted to display nicely under all resolutions and notably resolutions higher than 1080p (1920x1080 pixels) or DPIs higher than 100.

The APL Grid has been enhanced to always operate with the same DPI awareness as the APL+Win application.

Here is what the example function below when using the APL+Win v17 and its grid:



resulting in unreadable text and too small row heights, column widths, etc.: and here is what the same function would produce using the APL+Win v18 and its grid:



Note that:
  • the APL+Win Grid v17 can be used with all versions of APL+Win
  • the APL+Win Grid v18+ can only be used with APL+Win v18+
It is possible to re-register the APL+Win v17 grid after you have registered the APL+Win v18 grid and vice versa.

Example

    ∇ TestGrid
[1]   ←'ff'⎕wi'Create' 'Form'('scale'5)('size'350 550)
[2]   ←'ff'⎕wi'.gg.Create' 'APL.Grid'('where'0 0,'ff'⎕wi'size')
[3]   ←'ff'⎕wi'.gg.xRows'100
[4]   ←'ff'⎕wi'.gg.xCols'100
[5]   ←'ff'⎕wi'.gg.xValue'(⍳10)(⍳5)(1000×10 5⍴⍳100)
[6]   ←'ff'⎕wi'caption'('APL+Win Grid v',(1↓∊'.',¨⍕¨'ff'⎕wi'.gg.XGridVersion'),' (DPI=200)')
    ∇
More details...

Description

The ⎕userid System Function now returns the name of the user currently logged into Windows.

In previous versions ⎕userid was returning 15 blanks.

Note that it is basically the same as:
      GetUserName
Eric Lescasse

    ∇ r←GetUserName
[1]   ⍝∇ r←GetUserName -- Returns the current default User Name
[2]
[3]   r←(1+⎕io)⊃⎕wcall'WNetGetUser' ''(255⍴⎕tcnul)(82 ⎕dr 255)
[4]   r←(^\r≠⎕tcnul)/r
[5]
    ∇

Example

      ⎕userid
Eric Lescasse
More details...

Description

The APL+Win Grid xImageMetrics read-only property returns the following information about the xImageFile used to display images in cell corners:

  • imagefile image height (in virtual pixels)
  • imagefile image width (in virtual pixels)
  • number of images in imagefile
      100 TestGridImages ⍬
      'ff.gg'⎕wi'*xImageMetrics'
6 6 30
      200 TestGridImages ⍬
      'ff.gg'⎕wi'*xImageMetrics'
3 3 30
See also:
xImageMask
xImageScale

Example

    ∇ imageScale TestGridImages imageMask;images
[1]   ⍝∇ imageScale ←→ value to supply to the xImageScale property (default is 100)
[2]   ⍝∇ imageMask ←→ 256⊥B G R value to supply to the imageMask property (default is 256⊥255 255 255 i.e. white)
[3]   ⍝∇           or ⍬ which means white
[4]
[5]   :if⎕monadic ⋄ imageScale←100 ⋄ :endif
[6]   :if⍬≡imageMask ⋄ imageMask←256⊥255 255 255 ⋄ :endif
[7]
[8]   ⍝ Create the Form and its Grid
[9]   ←'ff'⎕wi'*Create' 'Form'('style'16)('scale'5)('*size'250 400)
[10]  ←'ff'⎕wi'*.gg.Create' 'APL.Grid'('*where'0 0,'ff'⎕wi'*size')
[11]  ←'ff'⎕wi'*.gg.xRows'100
[12]  ←'ff'⎕wi'*.gg.xCols'100
[13]  ←'ff'⎕wi'*caption'('APL+Win Grid v',(1↓∊'.',¨⍕¨'ff'⎕wi'*.gg.XGridVersion'),' (DPI=200)')
[14]
[15]  ⍝ Populate it with Images in corners of cells at rows 3 5 7 and columns 2 4
[16]  images←1 2 3 4∘.+4×3 2⍴0 1 2 3 4 5
[17]  ←'ff'⎕wi'*.gg.Image'(⍳4)(3 5 7)(2 4)images
[18]  ←'ff'⎕wi'*.gg.ImageFile' 'c:\aplwin18\examples\grid66.bmp'
[19]
[20]  ⍝ Test the new xImageScale and xImageMask properties
[21]  ←'ff'⎕wi'*.gg.xImageScale'imageScale
[22]  ←'ff'⎕wi'*.gg.xImageMask'imageMask
[23]  ←'ff'⎕wi'*.gg.XRedraw'
    ∇
More details...

Description

The xImageMask property allows to specify a transparent color for the images displayed in cell corners when using the xImage and xImageFile properties.

The example function below allows to test this new property.
      100 TestGridImages 256⊥255 255 255

      100 TestGridImages 256⊥0 0 255


See also:
xImageMask
xImageMetrics

Example

    ∇ imageScale TestGridImages imageMask;images
[1]   ⍝∇ imageScale ←→ value to supply to the xImageScale property (default is 100)
[2]   ⍝∇ imageMask ←→ 256⊥B G R value to supply to the imageMask property (default is 256⊥255 255 255 i.e. white)
[3]   ⍝∇           or ⍬ which means white
[4]
[5]   :if⎕monadic ⋄ imageScale←100 ⋄ :endif
[6]   :if⍬≡imageMask ⋄ imageMask←256⊥255 255 255 ⋄ :endif
[7]
[8]   ⍝ Create the Form and its Grid
[9]   ←'ff'⎕wi'*Create' 'Form'('style'16)('scale'5)('*size'250 400)
[10]  ←'ff'⎕wi'*.gg.Create' 'APL.Grid'('*where'0 0,'ff'⎕wi'*size')
[11]  ←'ff'⎕wi'*.gg.xRows'100
[12]  ←'ff'⎕wi'*.gg.xCols'100
[13]  ←'ff'⎕wi'*caption'('APL+Win Grid v',(1↓∊'.',¨⍕¨'ff'⎕wi'*.gg.XGridVersion'),' (DPI=200)')
[14]
[15]  ⍝ Populate it with Images in corners of cells at rows 3 5 7 and columns 2 4
[16]  images←1 2 3 4∘.+4×3 2⍴0 1 2 3 4 5
[17]  ←'ff'⎕wi'*.gg.Image'(⍳4)(3 5 7)(2 4)images
[18]  ←'ff'⎕wi'*.gg.ImageFile' 'c:\aplwin18\examples\grid66.bmp'
[19]
[20]  ⍝ Test the new xImageScale and xImageMask properties
[21]  ←'ff'⎕wi'*.gg.xImageScale'imageScale
[22]  ←'ff'⎕wi'*.gg.xImageMask'imageMask
[23]  ←'ff'⎕wi'*.gg.XRedraw'
    ∇
More details...

Description

The xImageScale property allows to scale the images displayed in cell corners when using the xImage and xImageFile properties.

The example function below allows to test this new property. I am using a 200 DPI screen.
      100 TestGridImages ⍬

      200 TestGridImages ⍬


See also:
xImageMask
xImageMetrics

Example

    ∇ imageScale TestGridImages imageMask;images
[1]   ⍝∇ imageScale ←→ value to supply to the xImageScale property (default is 100)
[2]   ⍝∇ imageMask ←→ 256⊥B G R value to supply to the imageMask property (default is 256⊥255 255 255 i.e. white)
[3]   ⍝∇           or ⍬ which means white
[4]
[5]   :if⎕monadic ⋄ imageScale←100 ⋄ :endif
[6]   :if⍬≡imageMask ⋄ imageMask←256⊥255 255 255 ⋄ :endif
[7]
[8]   ⍝ Create the Form and its Grid
[9]   ←'ff'⎕wi'*Create' 'Form'('style'16)('scale'5)('*size'250 400)
[10]  ←'ff'⎕wi'*.gg.Create' 'APL.Grid'('*where'0 0,'ff'⎕wi'*size')
[11]  ←'ff'⎕wi'*.gg.xRows'100
[12]  ←'ff'⎕wi'*.gg.xCols'100
[13]  ←'ff'⎕wi'*caption'('APL+Win Grid v',(1↓∊'.',¨⍕¨'ff'⎕wi'*.gg.XGridVersion'),' (DPI=200)')
[14]
[15]  ⍝ Populate it with Images in corners of cells at rows 3 5 7 and columns 2 4
[16]  images←1 2 3 4∘.+4×3 2⍴0 1 2 3 4 5
[17]  ←'ff'⎕wi'*.gg.Image'(⍳4)(3 5 7)(2 4)images
[18]  ←'ff'⎕wi'*.gg.ImageFile' 'c:\aplwin18\examples\grid66.bmp'
[19]
[20]  ⍝ Test the new xImageScale and xImageMask properties
[21]  ←'ff'⎕wi'*.gg.xImageScale'imageScale
[22]  ←'ff'⎕wi'*.gg.xImageMask'imageMask
[23]  ←'ff'⎕wi'*.gg.XRedraw'
    ∇
More details...

Description

The new EnableSSE2 INI file parameter is set to 0 by default, thus not enabling the SSE2 experimental speedups; you can set it to 1 to enable them.

Example

The EnableSSE2 parameter is in the [Experimental] section of the APLW.INI file:

[Experimental]
EnableSSE2=1
More details...

Description

SSE2 is a computer processor architecture and associated instruction set which provides for a single instruction to process multiple data items. Its application to APL+Win array operations has beneficial effects on performance.

When the EnableSSE2 .INI file parameter is set to 1, the SSE2 instruction set is used to optimize array-based arithmetic operations: + - × ÷. These array operations can run up to twice as fast as without SSE2 enabled depending on the size of the processed array. The DEMO_SSE2.W3 workspace is included in this release to test this enhancement.

The following benchmarks show improved performance gained by using SSE2:









Overall %Improved All Operations & All Array Sizes: 33.93%
Notes:
  • float, int indicate floating point array and integer array respectively
  • Array sizes were varied in the range [10, 100000]
  • fScal, iScal indicate floating point scalar and integer scalar respectively
  • Workstation: Win10 Pro, dual core 2.30Mhz
More details...

Description

The new DEMO_SSE2 workspace in the APL+Win v17.1 Examples folder contains functions to test the SSE2 speedup enhancements.
br/> Be sure to update the lx function if you did not install APL+Win v17.1 in C:\APLWIN17. More details...

Description

A new update to the LC.Charts application by Eric Lescasse that can display your APL data in a variety of charts. More details...

Description

Added support for DPI-awareness in the session manager window and the ⎕WI objects (excluding any ActiveX controls and objects). More details...

Description

Corrected placement of the Find and Replace dialogs when using multiple displays. This means the Find and Replace dialogs appears where they were last positioned instead of the primary display. More details...

Description

The opaque property defines the behaviour of the opaque feature in some APLGUI controls. The opaque property can have a value of 0 or 1. The default value is 1. A value of 0 causes the background of the object to be transparent such that the parent window behind it is visible through the background area of the control. For example, a Check control that's a child of a Picture control will display the image assigned to the Picture control as the background of the Check control. More details...

Description

The new style property value 65536 has been added to the Button and UButton objects to allow their caption to wrap when the width of the caption is wider than the width of these objects.

Example

      ←'ff'⎕wi'Create' 'Form'('scale'5)('size'200 300)
      ←'ff'⎕wi'.bn.Create' 'Button'('style'65536)('where'10 10 40 100)
      ←'ff'⎕wi'.bn.caption' 'Print the Excel Document'
More details...

Description

This enhancement improves the default font selection process for ⎕wi objects when running in DPI aware mode. This dramatically improves the font size versus window layout behaviour when running at high DPI scaling levels.

Example

      '#'⎕wi'defaultFont'
16 8 [MS Shell Dlg] 13 {Label Caption} 65 {WMXwmxiiii} 56
      ]display '#'⎕wi'defaultFont'
.→--------------------------------------------------------.
∣16 8 [MS Shell Dlg] 13 {Label Caption} 65 {WMXwmxiiii} 56∣
'---------------------------------------------------------'
      ⎕dr '#'⎕wi'defaultFont'
82
More details...

Description

The scale property has been extended to support scalemode = 6 to return true pixels.

Example

      ←'ff'⎕wi'*Create' 'Form'
      'ff'⎕wi'scale'
1 0 0 29.03125 92.125
      'ff'⎕wi'scale'6
      'ff'⎕wi'scale'
6
More details...

Description

The scale property scalemode element 5 now returns virtual pixels instead of pixels More details...

Description

Added the read-only system object property dpi that specifies the DPI-Aware state of APL. The four-element nested vector has the following values:
  1. returns 1 if APL+Win is running in DPI aware mode; 0 if DPI un-aware mode.
  2. returns the system-wide DPI scaling percentage of the system (100 by default, 200 for 200% scaling, etc.).
  3. returns the dots per inch of the system-wide DPI scaling (96 at 100% scaling, 192 at 200% scaling, etc.).
  4. returns the pixel height of the default font.

Example

      '#'⎕wi'dpi'
1 200 192 25    
More details...

Description

This version of the CSE implements a dual event channel so that custom event and routed events can be independently handled. This is necessary because APL+Win is a single-threaded application and the current version of the Microsoft SignalR server technology, used to contain the .Net portion of the CSE, now operates fully asynchronously. More details...

Description

The C# exception error message returned by the GetLastError method has been enhanced to include the exception message, exception stack trace, inner exception message, and inner exception stack trace. More details...

Description

This property controls the way that APL+Win sends text array information to the CSE. More details...

Description

Improvements in the CSE documentation have been implemented. Additional CSE examples have been developed. Some examples have been modified from prior versions to properly operate in this version of the CSE. which may be modified in a future version of the CSE. The complete list of modified examples are listed in the APL+Win C# Script Engine Update_v3.0.24.0.pdf. More details...

Description

  • The CSE installer has been updated: “APLNext CSE Components Setup v3.0.24.0.msi”. Before running the CSE installer check the file’s properties to be sure it is not ‘blocked’. The CSE installer registers ActiveX components of the CSE on the target workstation, therefore elevated privileges are required to properly install the CSE.
  • The CSE installer has been updated: “APLNext CSE Components Setup v3.0.24.0.msi”. Before running the CSE installer check the file’s properties to be sure it is not ‘blocked’. The CSE installer registers ActiveX components of the CSE on the target workstation and puts .Net components in the Global Assembly Cache, therefore elevated privileges are required to properly install the CSE.
  • The CSE installer will now install the CSE to a 32-bit or 64-bit version of the Windows operating system.
  • This version of the CSE requires APL+Win v17.0.01.
  • Features of the CSE which rely on accessing large memory spaces are not available when the CSE is installed in a 32-bit Windows operating system environment. Refer to CSE example #192.
More details...