Discussions related to Visual Prolog
Peter Muraya
VIP Member
Posts: 147
Joined: 5 Dec 2012 7:29

How to switch off a compiler warning

Unread post by Peter Muraya »

Hi,
I would like to switch off warning number 655. In version 7.4 of Visual Prolog I simply added the switch /w 655 to the project settings and got the results I wanted. Im trying the same in this version 7.5; the compiler would not accept it, throwing the error invalid option:'655'!. How should I proceed?
Mutall Data Management Technical Support
Martin Meyer
VIP Member
Posts: 328
Joined: 14 Nov 2002 0:01

Unread post by Martin Meyer »

Hello Peter,

I just tested it and was able to switch off the warning:

In current VIP 7.5.0.1 I created a new project of kind "console application" and put following code to main.pro

Code: Select all

implement main   class predicates     test : (string)         procedure anyflow. clauses     test(S) :-         stdIo::write(S).   clauses     run() :-         test("hello").   end implement main   goal     console::runUtf8(main::run).
Compiling it has given warning c655 : Predicate 'main::test/1' which is declared as 'anyflow' is used only with flow pattern '(i)'.

Then I inserted a line #options "/Warning:655-" in main.pack:

Code: Select all

#include @"main.ph"   #options "/Warning:655-"   % privately used packages #include @"pfc\console\console.ph" #include @"pfc\core.ph"   % private interfaces   % private classes   % implementations #include @"main.pro"
Now the warning does not show up when I am repeating the compile.

Many regards
Martin
Peter Muraya
VIP Member
Posts: 147
Joined: 5 Dec 2012 7:29

Unread post by Peter Muraya »

Thanks Martin, I copied your /Warning:655- and pasted it in the project settings and it worked too. Now I know the correct syntax. Thanks again.
Mutall Data Management Technical Support
Peter Muraya
VIP Member
Posts: 147
Joined: 5 Dec 2012 7:29

Unread post by Peter Muraya »

The correct syntax for the short form in the Project settings is /w:655-
Mutall Data Management Technical Support
Post Reply