Search the Community
Showing results for tags 'solved'.
Found 1 result
DavePritchard posted a topic in Native XDS-x86/XDS-CHi, I am still struggling to get my first module compiled, to start with I am trying to convert some Topspeed library modules written back in the 90's. The first one is Menus.mod, the Def file compiles Ok, I use the Menus module in several programmes , and have eliminated errors associated with FOR Loops etc, but now I get the following file create error, I assumed that the compiler would create this if the module compiled Ok. So has anyone any ideas as to why this error is occurring ? * [*** 0.00 F424] * file create error: "obj/Menus.o" no such file errors 1, warnings 28, lines 1917, time 0.18 [dave@localhost xds]$ ---------------------------------------------------------------------- 28 Warnings are listed !, constant condition eliminated , redundant code eliminated , unreachable code, possibly used before definition. The code compiled Ok with Topspeed and worked without bugs, so when I see the word "eliminated" To me that indicates that the code is not included and compiled, but the lines most certainly are required !. So what is the effect of these Warnings ? one procedure from Menus.mod is listed , with the associated Warnings. Any help with these issues would be most welcome.. Dave P.. PROCEDURE SetDepthWidth; [ ONE OF THE Menus.mod MODULE PROCEDURES ] VAR ThisX, LastX, ThisY, LastY : CARDINAL; BEGIN CurrentItem := 1; ChoiceWidth := 1; ChoiceDepth := 1; CurrentRec := MenuPtrs^.Choices; WHILE CurrentItem <= NumChoices DO IF CurrentItem > 1 THEN (* This line = constant condition eliminated, W902 *) CurrentRec := CurrentRec^.Next; (* This line = unreachable code, W311 *) END; WITH CurrentRec^ DO ThisX := xPos; (* This line = redundant code eliminated , W900 *) ThisY := yPos; (* This line = redundant code eliminated, W900 *) END; IF CurrentItem = 1 THEN (* This line = constant condition eliminated, W902 *) LastX := ThisX; LastY := ThisY; ELSE IF ThisX > LastX THEN (* This line = unreachable code W311, + possible use before definition $LastX, W304 *) INC( ChoiceWidth ); (* This line = unreachable code *) LastX := ThisX; END; IF ThisY > LastY THEN (* This line = unreachable code + possible use before definition $LastY, W304 *) INC( ChoiceDepth ); (* This line = unreachable code *) LastY := ThisY; END; END; (* if *) END; (* while *) END SetDepthWidth;