Vs basic


 
Thread Tools Search this Thread
The Lounge What is on Your Mind? Vs basic
# 8  
Old 05-24-2017
We use Indusoft VBScript at work... its basically the code behind script in all the HMIs we produce.

It could be better, but there isn't much you can't do in it that you need to do. It does a few things like bit level addressing, and you can work around limitations in the HMI package by being able to address global HMI variables by string formatting thier names and passing to a function which allows you to pretend that you have nested classes.. even though it doesn't really support that.

For instance Say I have a Control panel class CP as and I want to have Estop values in it... with fault, description and id fields, the work around is that I generate the tag names as strings to referece them in a for loop.... which you would be able to directly do with nested classes, its a much needed organizational structure that is sadly missing.

CP.ESTOP_Desc_1 ... n
CP.ESTOP_ID_1 ... n
CP.ESTOP_Fault_1 ... n

Interestingly they are intending to transition to Javascript... I'm not sure if that is a good thing or a bad thing :/ At least the HMIs will run on Linux potentially going forward currently they are ball and chained to Windows.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Basic help

Hi , I need to know the difference between $((command)) and $(command) and $(($(command))). "" and '' and ``. I have tried searching the help files but cant able to find this. Could you let me knoq about any document. Thanks (4 Replies)
Discussion started by: Raj999
4 Replies

2. Solaris

Basic - how do I?

How do I use ls and grep together to count a certain number of files in a directory? -Thanks (1 Reply)
Discussion started by: secno
1 Replies

3. UNIX for Dummies Questions & Answers

basic if else

I know this is pretty basic, but i cant figure it out to save my life. i want it to ask for a variable, as long as that variable isnt -/0 i want it to print out the area. else if the variable is -/0, i want it to print out invalid entry. the only problem is it will still try to print out the... (1 Reply)
Discussion started by: cookiebooy
1 Replies

4. HP-UX

to know the basic

Hi, Good morning I want to install HP-Unix in my PC. I already have windows XP home edition in my PC. I do not want remove XP,But I need HP-Unix in the same system. Is it posssible? If it is what is the name and version of HP-Unix cd? Where can I get the CD to install. I have... (4 Replies)
Discussion started by: nandhini
4 Replies

5. UNIX for Dummies Questions & Answers

Need some basic help

Hi everyone, I need some help! I know that this is a very simple little problem but I seem to be stuck. I was just wondering if you could show me the right way. I basicly have to write a single line of commands (using piping) to do the following: From the file data.txt, select all of the... (2 Replies)
Discussion started by: itk
2 Replies

6. HP-UX

Bt-basic

Hi Guys, I very new to bt-basic even I got 8 years experience on UNIX. I searched through google about bt-basic but nothing really give me solid documentation. Anybody have documentation or manual for this bt-basic? Pls help me (2 Replies)
Discussion started by: shahru
2 Replies

7. What is on Your Mind?

Basic...

hi, I am pretty new both to unix and this forum, can anyone help me to give shortcuts to my commands... eg:- instead of "cd /usr/bin" i want to to give " bin " and get to that path. I'm using HP-UX 11.0 abey (2 Replies)
Discussion started by: abey
2 Replies

8. UNIX for Dummies Questions & Answers

Basic

hi, I am pretty new both to unix and this forum, can anyone help me to give shortcuts to my commands... eg:- instead of "cd /usr/bin" i want to to give " bin " and get to that path. I'm using HP-UX 11.0 abey (2 Replies)
Discussion started by: abey
2 Replies
Login or Register to Ask a Question
Regexp::List(3pm)					User Contributed Perl Documentation					 Regexp::List(3pm)

NAME
Regexp::List - builds regular expressions out of a list of words SYNOPSIS
use Regexp::List; my $l = Regexp::List->new; my $re = $l->list2re(qw/foobar fooxar foozap fooza/); # $re is now qr/foo(?:[bx]ar|zap?)/ ABSTRACT
This module offers "list2re" method that turns a list of words into an optimized regular expression which matches all words therein. The optimized regular expression is much more efficient than a simple-minded '|'-concatenation thereof. DESCRIPTION
This module use Object-Oriented approach so you can use this module as a base and tweak its features. This module is a base class of Regexp::Optimizer. EXPORT Since this is an OO module there is no symbol exported. METHODS
This module offers methods below; $l = Regexp::List->new(key=>value, ...) Constructor. When arguments are fed in key => value, manner, it sets attributes. See "$l->set" for details $re = $l->list2re(list of words ...) Does the job. Takes a list of words and turn it into an optimal regular expresson. See "IMPLEMENTATION" to find out how it is achieved. If you want to know the underlying black magic even further, see the source. $l->set(key => value, ...) Sets attributes. There are many attributes supported but let me mention just a few that you may be interested. lookahead Whether you prepend a lookahead assertion or not. Default value is 1. This module is smart enough to omit the assertion when you don't need one. $re = $l->list2re(qw/1 2 3 infinity/); # qr/(?=[123i])(?:[123]|infinity)/ $re = $l->set(lookahead=>0)->list2re(qw/1 2 3 infinity/); # qr/(?:[123]|infinity)/ quotemeta Whether you quote metacharacters or not. Default is 1. If you really need this feature try Regexp::Optimizer instead. @list = qw/3 3.14 3.14159265358979/; $re = $l->list2re(@list); # qr/3(?:.14(?:159265358979)?)?)/ $re = $l->set(lookahead=>0)->list2re(@list); # qr/3(?:.14(?:159265358979)?)?)/ # which does match 3.14 but also "11+3=14" modifies Currently it accepts 'i', 'm', 's', and 'x', the same as regular expression modifiers. @list = qw/Perl perl BASIC basic/; $re = $l->list2re(@list); # qr/(?=[BPbp])(?:[Pp]erl|BASIC|basic)/ $re = $l->set(modifiers => 'i')->list2re(@list); # qr/(?=[bp])(?:perl|basic)/i print $l->set(modifiers => 'x')->list2re(@list); # Try for yourself; Isn't itcute ? $l->expand($re); Utility methods to expand a regular expression. Handy when you want to check the complex regexes. $l->unexpand($re); Utility methods to unexpand a regular expression. IMPLEMENTATION
This module optimizes the regular expression as follows. Let's see what happens when qw/foobar fooxar foozap fooza/ is fed trie building (common prefix aggregation) first the corresponding trie structure is built +- bar foo -+- xar +- za -+- p +- '' common suffix aggregation it checks if any leaf node can be optimized for common suffix. In this case we can do so to "bar" and "xar". +- b -+-ar foo -+- x -+ +- za -+- p +- '' character class conversion If a branch contains more than two single characters, it turns it into a character class. foo -+- [bx] --- ar +- za -+-p +- '' empty leaf to "?" Empty leaf is converted to a '?' quantifier foo -+- [bx] --- ar +- za -+-p? join all leafs into a group And the final result is reached. foo(?:[bx]ar|zap?) BENCHMARKS
This module is faily robust. You can practically use this module to find a regular expression that matches all words in a dictionary. Here is a result by on perl 5.8.0, FreeBSD 4-Stable, Pentium III 800 Mhz with 512 MB RAM. # Sat May 31 09:11:06 2003 ( 0.000000 s) Reading /usr/share/dict/words # Sat May 31 09:11:07 2003 ( 0.847797 s) 235881 lines read. # Sat May 31 09:11:07 2003 ( 0.000000 s) Making regexp. # Sat May 31 09:13:09 2003 ( 121.596928 s) Done. # Sat May 31 09:13:09 2003 ( 0.000000 s) Saving to t/words.rx # Sat May 31 09:13:09 2003 ( 0.000000 s) Reading t/words.rx # Sat May 31 09:13:13 2003 ( 3.679176 s) Done. # Sat May 31 09:13:13 2003 ( 0.000000 s) Opening /usr/share/dict/words for comparison. # Sat May 31 09:13:13 2003 ( 0.255222 s) /usr/share/dict/words:235881 lines found. # Sat May 31 09:13:13 2003 ( 0.000000 s) Showtime! # 235881/235881 # Sat May 31 10:44:17 2003 ( 5464.370409 s) Done. # Sat May 31 10:44:17 2003 ( 5464.370624 s) 43.167 matches/s The result of optimization is obvious as the number of alteration increases. Here is a result of a benchmark which matches randomly picked words against "/usr/share/dict/words". ==== 2 words Rate naive optim naive 1.79/s -- -28% optim 2.49/s 39% -- ==== 256 words s/iter naive optim naive 31.7 -- -81% optim 5.95 433% -- SEE ALSO
Regexp::Optimizer -- uses this module as its base "eg/" directory in this package contains example scripts. Perl standard documents perltodo, perlre CPAN Modules Regexp::Presuf, Text::Trie Books Mastering Regular Expressions <http://www.oreilly.com/catalog/regex2/> AUTHOR
Dan Kogai <dankogai@dan.co.jp> COPYRIGHT AND LICENSE
Copyright 2003 by Dan Kogai, All Rights Reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2011-11-16 Regexp::List(3pm)