March 28, 2024, 05:47:16 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


First Question - Compiler messages

Started by DeeCee, March 03, 2021, 07:58:09 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DeeCee

Hey folks,
Having a few minutes this morning, I decided to compile and run an included sample program (lines.iwb), just to get my feet wet. Right off the bat, I get error messages or warnings without making any changes at all, and I'm uncertain as to why. Here's what shows up in the output window:

Compiling Resources...
No Errors

Compiling...
lines.iwb
File: c:\users\tq_do\desktop\test projects\lines.iwb (9) Warning: Argument 9 (mainwindow) does not match the declaration of IWBWNDPROC
Different return type: none, should be int
File: C:\IWBDev3\bin\iwbstd.incc (10) Warning: See previous declaration of IWBWNDPROC
File: c:\users\tq_do\desktop\test projects\lines.iwb (32) Warning: See previous declaration of mainwindow

Linking...
IWBasic Linker v1.11 Copyright © 2011 Ionic Wind Software
Generating c:\users\tq_do\desktop\test projects\lines.exe
Build completed

It built the executable and it's functional, but I'm curious as to why it's complaining. (You should have access to the same source file in the examples folder)

-Doc-

DeeCee

Never mind folks... I figured it out. Apparently, that is an example source taken from Creative Basic or beyond.

I made the following change in the source, from this:
SUB handler
to this:

SUB handler ( ),int...and it no longer complained. :-)

I just gotta get used to the compiler messages I think:

-Doc

Brian

Hi, Doc,

Haven't visited that program in quite a while, so I tidied my copy up for you

Brian

DeeCee

I'm away from  home currently,  but will have a glance when I get back.

Thanks Brian!

DeeCee

Quote from: Brian on March 03, 2021, 09:10:35 AMHi, Doc,

Haven't visited that program in quite a while, so I tidied my copy up for you

Brian


As best I can tell, the only changes I noticed in your new code, was in adding the "Autodefine OFF" and then changing the way the main sub is structured --> (),int, which is what the compiler was complaining about and what I noted up above.

Do I need to be looking for anything else?

Brian

Doc, I knew there were very few changes, but I thought, what the heck, and posted anyway!

I do like the autodefine "off" though. Without it, you get a compiler error if a variable is undefined

Brian