Visual APL - Code Snippet: passing arguments by reference

General discussions related to APLNext's VisualAPL.

Moderators: Tech Support, phpbb_admin

Visual APL - Code Snippet: passing arguments by reference

Postby Ajay Askoolum » August 22nd, 2009, 5:56 am

a small demonstration, to counter the claim on comp.lang.apl that Win32 APLs can pass values by reference.
Attachments
PASSING BY REFERENCE.wmv
(1.29 MiB) Downloaded 734 times
Last edited by Ajay Askoolum on September 4th, 2009, 1:46 am, edited 4 times in total.
Ajay Askoolum
 
Posts: 884
Joined: February 22nd, 2007, 2:16 am
Location: United Kingdom

Excellent demo Ajay, thanks for posting it!

Postby joe_blaze » August 22nd, 2009, 11:43 am

If you review Ajay's video demo closely you will observe:

(1) That the function Second has no explicit result, yet it does affect the variable abc when Second is called from the function First with abc as its argument.

(2) That the assignment of ajay[1] in the function Second uses the 'assignment by reference' operator which in .Net languages is associated with the 'equals' glyph (=) and not the traditional and unique to APL "assignment by value" operator associated with the 'left arrow' glyph.

(3) That the variable abc is not global, yet its value can be modified using assignment by reference.

Why implement 'assignment by reference' in VisualAPL?

A VisualAPL programmer is not required to use the 'assignment by reference' operator. For example, in Ajay's video demo the traditional APL 'assignment by value' operator is used in the function First.

An important design principle of VisualAPL is that the traditional APL functionality is preserved and sometimes enhanced, but the mainstream programming features like 'assignment by reference' are supported by VisualAPL.

'Assignment by reference' is the mainstream standard assignment operator in all .Net languages. VisualAPL implements the 'assignment by reference' operator to maintain full inter-operability with the other .Net languages like C# and VB.Net.

Why care about 'mainstream' programming?
By design in VisualAPL this is an option, not a requirement.

Not all programming is done in a language-centric environment. Application system solutions are often constructed in components using the best programming language for a particular component. Inter-operability between components is based on mainstream standards, such as the Microsoft .Net Framework.

Application design and prototyping can be carried out rapidly and conveniently in VisualAPL in an interactive environment, the Cielo Explorer, which will be familiar to traditional APL programmers. The same VisualAPL source code can then be compiled into efficient production programs as .Net assemblies, using Visual Studio or the Microsoft complier included as part of the free .Net Framework. A VisualAPL .Net assembly can be deployed interchangeably and as an integral component of an application system solution built with any .Net language including C# and VB.Net.

The deployment options for such application system solutions, which can contain VisualAPL components, include web client (browser), web server, locally-installed with 1-click publishing features as well as cross-platform deployment to all mainstream operating system platforms including Windows PC, Windows Server, Windows Tablet, Window Pocket PC as well as Linux/Unix and Mac with the royalty-free Mono component.
joe_blaze
 
Posts: 384
Joined: February 11th, 2007, 3:09 am
Location: Box 361 Brielle, NJ 08730-0361


Return to VisualAPL

Who is online

Users browsing this forum: No registered users and 1 guest

cron