Is there a way to examine what exists?

General discussions related to using the C# Script Engine in APL+Win.

Moderators: Tech Support, phpbb_admin

Is there a way to examine what exists?

Postby Ajay Askoolum » November 20th, 2013, 6:52 pm

I have not come across this in C#(and is probably a silly idea), so I am not very hopeful! I'll ask anyhow.

Is there a way to do something akin to []nl 2 3 in the []cse managed code memory?

I can execute a multi statement string vector containing valid c# code that does not have a namespace. or class or function: what happens to the variables created in that vector?

For example:

Code: Select all
      ⎕cse 'GetValue' random
6 8 6 7 9 4 5 0 4 9 7 8 2 2 2

where random is a vector:

Code: Select all
//Return 15 random integers between 0 and 10 with replication
using System.Collections;
ArrayList a=new ArrayList();
Random rg = new Random();
for(int i=0;i<15;i++)
{
lock(new object());
a.Add(rg.Next(0,10));
}
a.ToArray();
Ajay Askoolum
 
Posts: 656
Joined: February 22nd, 2007, 2:16 am
Location: United Kingdom

Re: Is there a way to examine what exists?

Postby joe_blaze » November 21st, 2013, 4:49 am

Hi Ajay,

The CSE method you are requesting is not available in the current version, however it is scheduled for the next version of the CSE.

Joe
joe_blaze
 
Posts: 383
Joined: February 11th, 2007, 3:09 am
Location: Box 361 Brielle, NJ 08730-0361

Re: Is there a way to examine what exists?

Postby joe_blaze » May 22nd, 2014, 11:21 am

What has been created by the APL+Win programmer using the CSE can be seen by using the CSE 'instances' property and the CSE 'GetSessionTypes' and 'GetVariables' methods.
joe_blaze
 
Posts: 383
Joined: February 11th, 2007, 3:09 am
Location: Box 361 Brielle, NJ 08730-0361


Return to APL+Win & The C# Script Engine

Who is online

Users browsing this forum: No registered users and 1 guest

cron