Theme:
v
AsmFns DLL

Description

The AsmFns C# DLL is a C# implementation of all the Assembler routines contained in the APL+Win ASMFNS.W3 workspace.

These methods:

  • perform tasks extremely often needed by application developers
  • perform these tasks extremely fast because they are written in Assembler

As an Interop Assembly, the AsmFns C# DLL can be used by any language supporting ActiveX and by all .Net languages of course. So the AsmFns C# DLL can be used by:

  • C#
  • VB.Net
  • APL+Win
  • Dyalog APL
  • Visual Basic 6
  • etc.

The AsmFns C# DLL has been developed using NetAccess (watch NetAccess ScreenCast 1 and ScreenCast 2.

Buy

ProductPrice
AsmFns Dll140 €
AsmFns Dll with Source (complete C# project)200 €

Content

Here is the list of the ASMFNS functions which are part of the AsmFns C# DLL, with their respective syntax:

object AV(object strind);
string DEB(string text, string chars);
object DIV(object A, object B);
string DLB(string text, string chars);
string DLTB(string text, string chars);
string DTB(string text, string chars);
string[] DTBR(string[] mat1);
object INDEX1(object array, int[] inds);
string[] LJUSTIFY(string[] mat1);
string LOWERCASE(string str);
string MATtoSS(string[] mat, string delim);
int NBLENGTH(string text);
string[] OVER(string[] mat1, string[] mat2);
string[] RJUSTIFY(string[] mat1);
int[] ROWFIND(string[] mat1, string[] mat2);
int ROWFIND(string[] mat1, string mat2);
string SSASSIGN(string ss1, int[] ind, string ss2);
string SSCAT(string ss1, string ss2);
string SSCOMPRESS(bool[] b, string ss);
string SSDEB(string ss);
string SSDLB(string ss);
string SSDLTB(string ss);
string SSDROP(int nb, string ss);
string SSDTB(string ss);
int[] SSFIND(string ss1, string ss2);
string SSINDEX(string ss1, int[] ind);
int[] SSLEN(string ss);
int SSSHAPE(string ss);
string SSTAKE(string ss, int nb);
string[] SStoMAT(string ss);
bool[] SSUNIQUE(string ss);
string[] TELPRINT(string[] mat, int width);
string TEXTREPL(string str, string text);
string TRANSLATE(string xlat, string text);
string UPPERCASE(string str);
int[] WHERE(bool[] bits);
string WORDREPL(string str, string text);

Examples

Using these ASMFNS functions is very easy. Here are a few examples from various languages:

Example 1: from APL+Win

      'asmfns'⎕wi'Create' 'LescasseConsulting.AsmFns.AsmFns'
asmfns

      ⊃'asmfns'⎕wi'TELPRINT'('asmfns'⎕wi'methods')80
Close        Info         XDEB         XMATtoSS     XSSDEB       XSSTAKE
Create       Modify       XDIV         XNBLENGTH    XSSDLB       XSSUNIQUE
Defer        New          XDLB         XOVER        XSSDLTB      XSStoMAT
Delete       Open         XDLTB        XRJUSTIFY    XSSDROP      XTELPRINT
EnumEnd      Ref          XDTB         XROWFIND     XSSDTB       XTEXTREPL
EnumNext     Send         XDTBR        XROWFIND_2   XSSFIND      XTRANSLATE
EnumStart    Set          XINDEX1      XSSASSIGN    XSSINDEX     XUPPERCASE
Event        SetLinks     XLJUSTIFY    XSSCAT       XSSLEN       XWHERE
Exec         XAV          XLOWERCASE   XSSCOMPRESS  XSSSHAPE     XWORDREPL

      'asmfns'⎕wi'SSFIND' '/this/is/a/segmented/string' '/segmented/this'
3 0
      
      ⊃'asmfns'⎕wi'SStoMAT' '/this/is/a/segmented/string'
this
is
a
segmented
string

      'asmfns'⎕wi'WORDREPL' '/this/these/is/are/a//string/strings' 'this is not a segmented string'
these are not  segmented strings

      ('asmfns'⎕wi'DEB' '     This    is      a  segmented   string with   blanks' ' '),'.'
This is a segmented string with blanks.

Example 2: from Dyalog APL

      ⎕pw←80 ⋄ ⎕ml←3

      'asmfns'⎕wc'OLEClient' 'LescasseConsulting.AsmFns.AsmFns'

      ⊃asmfns.TELPRINT asmfns.MethodList 80
AV          INDEX1      ROWFIND     SSDLTB      SSTAKE      WHERE     
DEB         LJUSTIFY    ROWFIND_2   SSDROP      SStoMAT     WORDREPL  
DIV         LOWERCASE   SSASSIGN    SSDTB       SSUNIQUE              
DLB         MATtoSS     SSCAT       SSFIND      TELPRINT              
DLTB        NBLENGTH    SSCOMPRESS  SSINDEX     TEXTREPL              
DTB         OVER        SSDEB       SSLEN       TRANSLATE             
DTBR        RJUSTIFY    SSDLB       SSSHAPE     UPPERCASE             

      asmfns.SSFIND '/this/is/a/segmented/string' '/segmented/this'
3 0
      ⊃asmfns.SStoMAT ⊂'/this/is/a/segmented/string'
this     
is       
a        
segmented
string   

      asmfns.WORDREPL '/this/these/is/are/a//string/strings' 'this is not a segmented string'
these are not  segmented strings

      (asmfns.DEB '     This    is      a  segmented   string with   blanks' ' '),'.'
This is a segmented string with blanks.

Example 3: from C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using LescasseConsulting.AsmFns;

namespace WindowsFormsApplication2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            AsmFns asmfns = new AsmFns();
            int[] pos = asmfns.SSFIND("/this/is/a/segmented/string", "/segmented/this");
            string[] strs = asmfns.SStoMAT("/this/is/a/segmented/string");
            string str = asmfns.WORDREPL("/this/these/is/are/a//string/strings", "this is not a segmented string");
            string txt = asmfns.DEB("     This    is      a  segmented   string with   blanks", " ") + ".";
        }
    }
}