News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

Recent posts

#71
Expert questions / Re: Re: Using a structure as r...
Last post by John Z - June 01, 2025, 11:33:12 AM
Thanks pkparchure,

Quote from: pkparchure on June 01, 2025, 08:03:58 AMAs suggested I have extracted main code pertaining to statistical analysis and a complete project is attached as a zip file.

I can't explain it  :( !
Tried various modifications and could not get it to show, just as you have experienced.
Also can't explain why when I drop just that same structure and proc into my existing program it does show.  Stumped for now.

John Z
#72
Expert questions / Re: Re: Using a structure as r...
Last post by TimoVJL - June 01, 2025, 09:27:12 AM
pobr.exe /B /W /Ftest.db3 gsStat.c
pobr.exe /L /Ftest.db3
proves, that function is missing from database.
#73
Expert questions / Re: Using a structure as retur...
Last post by pkparchure - June 01, 2025, 08:03:58 AM
As suggested I have extracted main code pertaining to statistical analysis and a complete project is attached as a zip file. Exe file is also there if it does not get dropped. However, the program can be easily compiled within the project.

I have also put a ReadMe.txt file within the zip file giving some explanations about the program and myself.


TimoVJL, John Z and MrBcx - Thanks a lot for your responses. I wish to tell MrBcx that I am a great fan of BCX - Basic to C translator.
#74
Expert questions / Re: Using a structure as retur...
Last post by MrBcx - May 31, 2025, 10:27:47 PM
Hi pkparchure,

My recommendation:

If possible, upload a zip containing your project.  If that is not possible,
upload a zip containing mock project files that expose the v13 IDE bug.

That should make it easier for others to help you or to confirm the bug.
#75
Expert questions / Re: Re: Using a structure as r...
Last post by John Z - May 31, 2025, 10:17:51 PM
Hi pkparchure,

No, I was not suggesting putting in main as a solution.  It just happened that was the open
page.  Below you see it working in a support file.

You mentioned it compiles but your screen shot shows an error 1 alert, have you investigated where that was coming from?  Also you should be seeing a warning
warning #2096: Missing return value. on the declaration line number - is there one?

The only way I have been able to get it to not show is if there is an error in the procedure declaration.

John Z
#76
User contributions / Re: Enumerating remote printer...
Last post by Vortex - May 31, 2025, 09:38:00 PM
Hello,

I should add this clarification : Assuming that my application's name is ListPrinters, here is to list the local printers :

ListPrinters \\computer-name
computer-name is the name of the local system.
#77
Expert questions / Re: Using a structure as retur...
Last post by pkparchure - May 31, 2025, 05:17:03 PM
No it does not show up in my case. Kindly look at the screenshot put by me in my post. There are two functions in the file gsStat.c one is int PrintStat(Statistics stats), which uses the statistics obtained from Statistics calculate_statistics(DataStruct gsData, int nRows, int vCol).

As seen in the screenshot put by me, only {}PrintStat is visible but not the {}calculate_statistics.

As suggested TimoVJL JohnZ by I tried to put the code for calculate_statistics in my main file gsMain.c as

Statistics calculate_stats1(void* gsData, int nRows, int vCol)
{
}

It does not show in the panel

However, if I write it in classical C way:

Statistics Stats;

void calculate_stats2(void* gsData, int nRows, int vCol, Stats)
{
}
it shows in the panel.

I have not tested these two functions by calling them but the program compiles.

I have put a second screenshot showing the two functions.

#78
Expert questions / Re: Using a structure as retur...
Last post by John Z - May 31, 2025, 12:33:23 PM
Hi pkparchure,

It seems to work ok for me as well.  As TimoVJL shows.

One thing in your procedure definition that I noticed, I think
   Statistics calculate_statistics(DataStruct gsData, int nRows, int vCol)
should be
   Statistics calculate_statistics(Statistics gsData, int nRows, int vCol)
but of course you didn't show what DataStruct was so you could be correct ....

in any case here is my screen shot test result:

John Z
#79
Work in progress / Re: win32-doc md files
Last post by John Z - May 31, 2025, 12:14:52 PM
Hi TimoVJL,

Attached is the new DB for the GitHub win32-docs.zip offline documentation.  Every API_NAME output by your extract program is accessible in the DB.

Had some clean-up to do and I'm looking for 'runs the first time" bug in my C access program.

So posting the DB now.  Later posting my access program when bug free, but I'm sure it is not really needed by most people.  Because of the complexity/inconsistency of the win32-doc using a sql 'like' command will often be the first step in getting to the document desired.

Like the 1st db the "Win32-docs\\desktop-src\\" is to be pre-appended to the SQL returns, that is the DB returns the SubDir and the actual filename.md, as before.

John Z
#80
Expert questions / Re: Re: Using a structure as r...
Last post by TimoVJL - May 31, 2025, 11:47:10 AM
Not sure what you mean.
This example shows {} calculate_statistics in project panel.
typedef struct {
    int count;
    double min;
    double max;
    double mean;
    double median;
    double mode;
    double std_dev;
    double coeff_variation;
    double skewness;
    double kurtosis;
} Statistics;

Statistics calculate_statistics(void* gsData, int nRows, int vCol)
{
}