Silverfrost Forums

Welcome to our forums

Using SCC

14 Sep 2011 9:18 #8969

Is it still advisable to use SCC in Plato, considering that its development has been frozen for a long time? We have a lecturer who wants to continue using it in his teaching, and had problems through the latest Plato 4.4.

So I ran an old C++ test program that I have run in the past successfully, but in the latest Plato it fails with access violation or runtime error. Its initial lines are:

#include <stdio.h> // for printf #include <stdlib.h> // for atoi #include <time.h> // for mktime etc. #include <clib.h>

int main() { char *weekday[] = {' Sun',' Mon',' Tues',' Wednes', ' Thurs',' Fri',' Satur', 'n unknown '}; char *str[10],za; struct tm birth;

printf('Type in test character\\n');
getch();

It writes out 'Type in test character', but pressing any key in response makes the program crash.

Please note that I am not experienced in C/C++.

Thanks.

14 Sep 2011 11:41 #8972

There is no reason why you should not continue to use SCC in Plato unless you need features of C++ that have not been implemented.

As you say, SCC has been frozen for some time now so C++ has moved on.

Your test program works OK for me. Try installing the Silverfrost personal edition on a local machine first of all to see if this works.

14 Sep 2011 1:51 #8975

Paul, thanks.

I have two different problems which, I believe, are related to drives. PCs mentioned below are Windows XP, 32 bit.

  1. On a clean PC, I installed Plato in default C:\program files etc., and happened by chance to have the source C program (mentioned above) located on a mapped drive. It failed during execution with access violation. I moved the program to a folder under 'My Documents' , and it worked.

  2. For our users we have Plato deployed through Microsoft APP-V, which means it appears as installed on a virtual drive V:\. On such a client PC, I launched the APP-V deployed Plato, and had the source file in C:\DIR. It **failed **with access violation.

So the program only worked when **both **Plato and the source file were on C:\.

  1. A different program. I launched Plato as in (1), then went to 'Help > SCC' and copied the example program for 'gets':

// gets.cpp #include <stdio.h> // for gets, etc. int main() { char str[80]; printf('Input:\n'); do { gets(str); puts(str); } while (*str); if (ferror(stdin)) printf('ERROR:Read error in gets\n'); return 0; }

I saved the source under 'My Documents'. The program **fails **with access violation. I moved the sourse to C:\temp. The programs **works **fine.

14 Sep 2011 2:26 #8976

I should mention that we don't get any such problems with FTN95 programs through Plato. The location of the installation or of the program source files doesn't cause any problems.

14 Sep 2011 2:59 #8977

There should be no difference between FTN95 and SCC so I assume there is something different in your deployment.

Make sure that the access rights to all the files are the same for SCC as they are for FTN95.

14 Sep 2011 3:03 #8978

Our user had mentioned that these problems didn't occur in Plato3. So I got hold of v. 3.20 and installed it, and tried the same situation as (1) above. It worked.

15 Sep 2011 9:08 #8987

I have now simplified it to this. Here is an example program:

#include <iostream.h>

main() { int i,j; cout << 'Please enter 1st value' << endl; cin >> i ;

cout << 'Please enter 2nd value ' << endl ; cin >> j ;

cout << 'First was ' << i << endl ; cout << 'Second was ' << j << endl ; cout << 'Sum is ' << ( i+j) << endl ;

return 0; }

It compiles, links and runs fine through Plato 3.20.

Through Plato 4.4, whether you re-compile and re-link it, or use the exe generated under Plato 3.20, when you run it, it outputs 'Please enter 1st value', but typing a value and pressing return gives Run-time error.

Another difference is that under Plato 3.20 it outputs a line-break after 'Please enter 1st value', but does not under Plato 4.4.

You can generate the exe under either 3.20 or 4.4, it doesn't matter. It's when you run it, that it works under 3.20 but fails under 4.4.

15 Sep 2011 9:48 #8989

The root of the problem will probably be either

  1. some change affecting salflibc.dll or

  2. a change in the way that Plato launches your executable.

You should be able to distiguish between these two by running the exe from a command prompt window rather than starting it up from Plato.

15 Sep 2011 10:07 #8990

The same problem arises from the command prompt. The exe works from the command prompt of the Plato 3.20 installation, but fails from 4.4.

15 Sep 2011 6:41 #8992

In which case, as far as SCC is concerned, you may be able to use the old salflibc.dll with the new Plato but keep a backup of the replaced dll.

I have just fixed a cout bug in salflibc.dll but I don't know how or when the regression occured.

Please login to reply.