Search found 19 matches

by uwejanza
Fri Oct 28, 2011 3:24 pm
Forum: APL Chat
Topic: control structure surprise
Replies: 4
Views: 10955

Re: control structure surprise

If I misunderstood something please explain what you think is wrong. Thanks, Dan. There is nothing wrong. From other programming languages I know compiler options that enable shortcut evaluation of compound condition expressions connected with AND and OR, so that in a (pseudo-)statement like IF ...
by uwejanza
Thu Oct 27, 2011 5:06 pm
Forum: APL Chat
Topic: control structure surprise
Replies: 4
Views: 10955

control structure surprise

I just came across a surprising piece of code that had been accepted by the interpreter. Here is a simple example. Verification of numeric data type omitted for the sake of simplicity. ∇Test a :If a<4 ⎕←'a is less than 4' :AndIf a=3 ⎕←'a equals 3' :Else ⎕←'none of the above' :EndIf ∇ Please, let's no ...
by uwejanza
Tue May 24, 2011 4:22 pm
Forum: Object Oriented Programming
Topic: The Need for Copy Constructors
Replies: 20
Views: 77493

Re: The Need for Copy Constructors

As far as I need it in my applications, it does work for derived classes. The ∆CopyFrom and ∆CopyTo properties are implemented in one central base class that I derive from. This base class also implements a MakeMeACloneOf method. The basic functionality lies in the line ∆CopyTo←SourceObject.∆CopyFr ...
by uwejanza
Mon May 23, 2011 4:40 pm
Forum: Object Oriented Programming
Topic: The Need for Copy Constructors
Replies: 20
Views: 77493

Re: The Need for Copy Constructors

Just to give an example of what works for me to clone object instances as far as I need it in my application - not claiming to deliver a solution that deserves being called general or complete. Seems to me quite close to what Paul proposed. Still there is an annoying inconsistency in use of name ...
by uwejanza
Wed May 11, 2011 3:32 pm
Forum: Windows: GUI, COM/OLE/ActiveX
Topic: 32 Bit Dyalog SQAPL under 64 Bit Windows 7
Replies: 0
Views: 6472

32 Bit Dyalog SQAPL under 64 Bit Windows 7

When trying to run Dyalog 12.0 32 Bit Unicode SQAPL under 64 Bit Windows 7 using ODBC data sources, it is necessary to create data sources that are explicitly made for 32 bit access. When trying to access a DSN created by means of the Windows 7 (64-bit) standard ODBC admin console of the OS, I got ...
by uwejanza
Tue Apr 12, 2011 5:11 pm
Forum: Microsoft.NET
Topic: Do I have to migrate my ASP.NET application?
Replies: 0
Views: 5653

Do I have to migrate my ASP.NET application?

In a large Dyalog 12.0 ASP.NET application using APL classes and inheritance I am running into problems that might be related to the dotnet interface. I am hesitating to migrate the application to the next Dyalog version because the server hosts several applications and there is no peaceful ...
by uwejanza
Tue Apr 12, 2011 4:37 pm
Forum: Object Oriented Programming
Topic: Copy a class into a namespace
Replies: 4
Views: 16799

Re: Copy a class into a namespace

A Class is an APL object. I think that every APL object should be copied without any hierarchic dependency. Taking that sentence literally leads to a different solution: let us use ⎕CY to copy an APL "object" (according to APL old-speak). To use ⎕CY the workspace containing the original classes to b ...
by uwejanza
Wed Apr 06, 2011 3:15 pm
Forum: Object Oriented Programming
Topic: Copy a class into a namespace
Replies: 4
Views: 16799

Re: Copy a class into a namespace

To create the copy of a class in some namespace you have to fix the source of the class inside the target namespace. Here is a function that does the trick, and some little extra checking. Left argument is the name of the target namespace, right argument is the name of the class to be copied. Both ...
by uwejanza
Fri Feb 25, 2011 2:09 pm
Forum: Language
Topic: about []CT comparison tolerance
Replies: 7
Views: 24842

Re: about []CT comparison tolerance

First, let's look at some experimental results in Dyalog 12.1: ⎕pp←17 ⎕ml←0 ⎕ct←0 ⊃10*-⍳10 0.1 ⊃10*-⍳11 0.09999999999999998 ⊃10*-⍳51 0.10000000000000006 ⊃10*-⍳1151 0.09999999999999992 If I got Goeff's post right, the interpreter should in any case first calculate the value of "10 to the power of the ...
by uwejanza
Wed Feb 09, 2011 10:06 am
Forum: Windows: GUI, COM/OLE/ActiveX
Topic: Paste column into grid
Replies: 6
Views: 20290

Re: Paste column into grid

I just repeated Phil's extension to Kai's example with Excel: 'cl' ⎕wc'Clipboard' ⍝ Copy 1 row and 3 columns into the clipboard ⍴cl.Array 1 3 ⍝ Copy 3 rows and 1 column into the clipboard ⍴cl.Array 3 Same result as with ooo. Seem like for once in my life Bill is not the one to be pestered.