File compatibility

I want to run a file with extension .g but it doesn't work in the Gauss program (I don't see output).

Gauss is compatible just with .gss files?

1 Answer



0



For the most part, GAUSS will run a file with any file extension. The only time you might run into issues is if you used an extension that means a compiled file (.gcg).

GAUSS will run a file with a .g file extension. Most likely the problem is that the code you are running does not create any output.

It is possible that the code just defines some data, but does not print a report like this:

heights = { 54, 63, 44, 51 };
height_mean = meanc(heights);

If it is this case, then you just need to print the output to see the result as shown below. Our GAUSS Basics YouTube videos also show this.

print height_mean;

The other possibility is that the code just defines a procedure, but does not call it. For example, running the code below:

proc (1) = hypotenuse(a, b);
    local c;

    c = sqrt(a.^2 + b.^2);

    retp(c);
endp;

only tells GAUSS about the hypotenuse function. It does not run it. You would have to add data and call it like this:

x = 3;
y = 5;

z = hypotenuse(x, y);

print "z = " z;

proc (1) = hypotenuse(a, b);
    local c;

    c = sqrt(a.^2 + b.^2);

    retp(c);
endp;

aptech

1,773

Your Answer

1 Answer

0

For the most part, GAUSS will run a file with any file extension. The only time you might run into issues is if you used an extension that means a compiled file (.gcg).

GAUSS will run a file with a .g file extension. Most likely the problem is that the code you are running does not create any output.

It is possible that the code just defines some data, but does not print a report like this:

heights = { 54, 63, 44, 51 };
height_mean = meanc(heights);

If it is this case, then you just need to print the output to see the result as shown below. Our GAUSS Basics YouTube videos also show this.

print height_mean;

The other possibility is that the code just defines a procedure, but does not call it. For example, running the code below:

proc (1) = hypotenuse(a, b);
    local c;

    c = sqrt(a.^2 + b.^2);

    retp(c);
endp;

only tells GAUSS about the hypotenuse function. It does not run it. You would have to add data and call it like this:

x = 3;
y = 5;

z = hypotenuse(x, y);

print "z = " z;

proc (1) = hypotenuse(a, b);
    local c;

    c = sqrt(a.^2 + b.^2);

    retp(c);
endp;


You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.

Try GAUSS for 14 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy