Looking for a simple scripting language that can easily integrate with .NET.

We have several electronic technicians who do not have programming experience. I would like the scripting language to be easily mastered using a simple forgiving syntax that can integrate with .NET and easily run static or single instance methods. Which scripting language can meet these requirements?

Note. Perl is excluded, C # script will be nice, but the syntax is a little inexorable.

Edit: I would like to do something like this.

Instrument("MultiMeter1").Measure
if (LastMeasurement.IsInRange(50,100))
{
   Test.Pass = true;
}
+3
source share
12 answers

Short list includes

  • Powerhell
  • IronRuby
  • IronPython
  • Boo

PowerShell , , Win2008 Win7.

, PowerShell , , , , XML, COM, AD WMI.

> $five = "5"
> $five + 5
55
> [int]$five + 5
10
> [datetime] "Nov 12"
Thursday, November 12, 2009 12:00:00 AM

: , ( v2), .net-, -

$meter = Get-Measurement MultiMeter1
if ($meter.IsInRange(50,100))
{   
   Set-TestResult $meter $true
}
+8

PowerShell?

+5

IronPython

IronRuby. , .

+3
+2

PowerShell .

+1

Dynamic Language Runtime. , IronPython IronRuby.

.NET( ).

+1

VBScript , .NET .NET- , , , , Python.

, VB *.NET *. VB , "" , BASIC, , . , ,.NET , , , CLR.

+1

F # (aka F-Sharp, VS2010) , . F # Microsoft Research:

F # , , , , expresivity scripting, , . , .NET. . F # :

  • , ,
  • , Python ,
  • ,
  • , ML,
  • - , OCaml,
  • , #,
  • .NET- ,
  • ,
  • Visual Studio, Studio 2008 Shell
  • ,
  • , .NET Framework.

F # ( FSharp) - ///- , .

, , :

, " C", , , ( + + = ).

, , , JavaScript ( , ). .

let a = 1                    // bind 1 to identifier a
let b = a + 1                // bind function which adds 1 and a to b
let s = "Simple add"         // bind string to identifier s
printf "%s: %i %i" s a (b 1)

, lambdas, , :

[ 1; 2; 3; 4; 5; 6 ]
|> List.map (fun a -> a + 1)            // add +1 to every item in the list
|> List.reduce_left (fun a b -> a * b)  // Multiply all the elements together

, , :

[ 1; 2; 3; 4; 5; 6 ]
|> List.map ((+) 1)
|> List.reduce_left (*)
+1

, , . VB GPIB . , script . . http://testview.wordpress.com/2011/11/14/electronics-test-scripting-language/ www.ontestengineering, .

+1

, VBScript? / CLR, COM . COM - PITA, , vb ... , !

VB

0

JScript.NET.

0

, , PowerShell, .

PowerShell.org ScriptingAnswers.com

, PowerGUI PowerISE, PowerShell.

0

Source: https://habr.com/ru/post/1711109/


All Articles