Results 1 to 2 of 2

Thread: program Scalar

  1. #1
    Floetic's Avatar
    Floetic is offline Member
    Join Date
    Feb 2008
    Location
    Belfast, Northern Ireland, UK
    Posts
    8
    Rep Power
    0

    Post program Scalar

    I'm using NetBeans IDE 5.5


    package scalar;

    /**
    *
    * @author UndergroundPassion
    */
    public class Main {

    /** Creates a new instance of Main */
    public Main() {
    }

    /**
    * @param args the command line arguments
    */
    public static void main(String[] args) {
    // TODO code application logic here

    int a[3], b[3], c[3];
    int x;
    for [i = 0 to 2] {
    a[i] = i;
    b[i] = 2 i;
    c[i] = 999;
    }
    proc row[i = 0 to 2] {
    c[i] = a[i]*b[i];
    }
    x = c[2];
    }

    }


    I keep getting this in the output window:


    init:
    deps-jar:
    Compiling 1 source file to G:\YR4 SEM2\COM577J2 Concurrent and Distributed Systems\Lectures\Week2\Scalar\build\classes
    G:\YR4 SEM2\COM577J2 Concurrent and Distributed Systems\Lectures\Week2\Scalar\src\scalar\Main.java :28: ']' expected
    int a[3], b[3], c[3];
    G:\YR4 SEM2\COM577J2 Concurrent and Distributed Systems\Lectures\Week2\Scalar\src\scalar\Main.java :28: not a statement
    int a[3], b[3], c[3];
    G:\YR4 SEM2\COM577J2 Concurrent and Distributed Systems\Lectures\Week2\Scalar\src\scalar\Main.java :28: ';' expected
    int a[3], b[3], c[3];
    G:\YR4 SEM2\COM577J2 Concurrent and Distributed Systems\Lectures\Week2\Scalar\src\scalar\Main.java :28: not a statement
    int a[3], b[3], c[3];
    G:\YR4 SEM2\COM577J2 Concurrent and Distributed Systems\Lectures\Week2\Scalar\src\scalar\Main.java :30: '(' expected
    for [i = 0 to 2] {
    G:\YR4 SEM2\COM577J2 Concurrent and Distributed Systems\Lectures\Week2\Scalar\src\scalar\Main.java :30: illegal start of expression
    for [i = 0 to 2] {
    G:\YR4 SEM2\COM577J2 Concurrent and Distributed Systems\Lectures\Week2\Scalar\src\scalar\Main.java :30: ';' expected
    for [i = 0 to 2] {
    G:\YR4 SEM2\COM577J2 Concurrent and Distributed Systems\Lectures\Week2\Scalar\src\scalar\Main.java :30: not a statement
    for [i = 0 to 2] {
    G:\YR4 SEM2\COM577J2 Concurrent and Distributed Systems\Lectures\Week2\Scalar\src\scalar\Main.java :30: ';' expected
    for [i = 0 to 2] {
    G:\YR4 SEM2\COM577J2 Concurrent and Distributed Systems\Lectures\Week2\Scalar\src\scalar\Main.java :32: illegal character: \8211
    b[i] = 2 i;
    G:\YR4 SEM2\COM577J2 Concurrent and Distributed Systems\Lectures\Week2\Scalar\src\scalar\Main.java :32: not a statement
    b[i] = 2 i;
    G:\YR4 SEM2\COM577J2 Concurrent and Distributed Systems\Lectures\Week2\Scalar\src\scalar\Main.java :35: ']' expected
    proc row[i = 0 to 2] {
    G:\YR4 SEM2\COM577J2 Concurrent and Distributed Systems\Lectures\Week2\Scalar\src\scalar\Main.java :35: ';' expected
    proc row[i = 0 to 2] {
    G:\YR4 SEM2\COM577J2 Concurrent and Distributed Systems\Lectures\Week2\Scalar\src\scalar\Main.java :35: not a statement
    proc row[i = 0 to 2] {
    G:\YR4 SEM2\COM577J2 Concurrent and Distributed Systems\Lectures\Week2\Scalar\src\scalar\Main.java :35: ';' expected
    proc row[i = 0 to 2] {
    15 errors
    BUILD FAILED (total time: 2 seconds)

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    What you are trying to do here. Seems to me this is not a Java code. More like to pseudo code for me.

    What kind of scalar this is? Give more details, if so I can try it out.

Similar Threads

  1. Executing a program within a program
    By gibsonrocker800 in forum New To Java
    Replies: 5
    Last Post: 05-12-2008, 08:24 AM
  2. Replies: 0
    Last Post: 04-04-2008, 02:40 PM
  3. cannot run the program
    By amiey in forum New To Java
    Replies: 1
    Last Post: 11-20-2007, 04:13 AM
  4. Replies: 0
    Last Post: 10-04-2007, 09:33 PM
  5. Why does this program not end?
    By trill in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 07:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •