top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Out of vbscript and Javascript which one is better?

+1 vote
462 views

Explain with the reason.

posted May 14, 2014 by Amarvansh

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Comparison of JavaScript and VBScript

Similarities:

  • Both languages are easy to learn and do not require any expensive development tools
  • Both can be used to enhance web pages
  • They run on client machines and can substitute CGI programs to reduce server loads
  • Both can abuse and run malicious scripts on clients' machines

Differences

  • JavaScript is the default scripting language for browsers but VBScript must be specified as the scripting language.
  • JavaScript has cross-platform support from all popular browsers while VBScript is supported MS IE only.
  • VBScripters would thus loose a sizable audience.
  • One of the most significant issues with JavaScript is that there were different releases of the language since its inception (version 1.0). Similarly, different versions of browsers exist on users machines. Therefore, code written for one version may not necessarily work on another. More testing would be necessary thus, development time increases.
  • JavaScript is case sensitive but VBScript is not this would not be prone to as many syntax errors.<
    JavaScript uses the same character for concatenation as it does for addition (the + character) while the '&' concatenating character is used in VBScript. This is another source of errors in JavaScript.
answer May 15, 2014 by Nikita Sehgal
Similar Questions
0 votes

Data file look:-
6 invoices. Each line represent 1 invoice data. Each column separated by | pipe.

7031982|BALANCE|000000 rent on 23/03/2019|0768|110241|385272|PETTY CASH OLAYAN|VENDOR|BPV2019-3|
7031986|BALANCE|000000|0768|226005|388883|\NOMAN\12\as\|EMPLOYEE|BPV2019-377|
7031986|BALANCE|000000|0768|226011|388883| NOMAN|EMPLOYEE|BPV2019-377|
7031986|BALANCE|000000|0768|240007|388883| NOMAN|EMPLOYEE|BPV2019-377|
7032003|BALANCE|000000|0703|231085|384173|WATER COMPANY|VENDOR|BPV2|
7032003|BALANCE|033511|0768|503000|384173|WäTER COMPANY|VENDOR|BPV2|

Requirement:- I need a bat file which will correct existing file

Some times we get the data like:-
1. |1797 \krv\Fice\AP\klo|
==> this should convert like || (just removing complete data within |)
2. |\krv\Finance\Finance\ap\INS12O|
==> this should convert like || (just removing complete data within |)
3. |\as\sa\1\as\|
==> this should convert like || (just removing complete data within |)
4. |second rent at cal on 23/05/2019|
==> this should convert like |second rent at cal on 23-05-2019| (just replace / with - )
5. | Johannes Märkl Monatsrechnung|
==> this should convert like | Johannes Markl Monatsrechnung | (just replace ä with a )

below is code

    @echo off
setlocal enabledelayedexpansion

(for /f "delims=" %%a in (a30077889.txt) do (
  set "line=%%a"
  set "newline="
  for %%b in ("!line:|=" "!") do (
    set "token=%%~b"
    if "!token:~0,1!"=="\" (
     set "newline=!newline!|"
    ) else (
      set "newline=!newline!%%~b|"
    )
  )
  echo !newline:~0,-1!
))>a.new
REM move /y a.new a30077889.txt
0 votes

Also,tell me what are the types of framework are there ?

...