Roger Cigol

Current status: "Tokyo 10.2 looks good to me !" - 8 months ago
Member since: Thursday, 09 October 2014
Last login: 15 hours 53 minutes ago
Profile viewed: 2,329 views

Your Rank: 32
Points: 85

Roger Cigol replied to the topic 'Convert older C++ Builder source with Builder C++' in the forum. 2 days ago

Hi Tony,
I had another memory flash: This year's code rage series of webinars had
Al Mannarino - Migrating your C++Builder Projects to Unicode
This is now on youtube:
https://www.youtube.com/watch?v=H-KFq5M0z0A
Regards, Roger

Read More...

Roger Cigol replied to the topic 'Convert older C++ Builder source with Builder C++' in the forum. 2 days ago

Hi Tony,
strcat is now simply the '+' operator : String MyNewString = OldString1 + OldString2;
strcpy is now simply the '=' operator : String MyNextNewString = MyNewString;
Regards, Roger

Read More...

Roger Cigol replied to the topic 'Convert older C++ Builder source with Builder C++' in the forum. 2 days ago

Hi Tony,
There was a big jump from C++ Builder 6 to the next one, when String type was changed from an 8 bit ANSI string to a Unicode string.
There is no quick fix here. If code uses String exclusively the manual change is not normally too tricky. But it sounds like your code uses a lot of char[] arrays and is using a lot of C style strings.
One option is to use the standard template library std::string type - this is an 8 bit char based string. The headache here is that std::string is [0] referenced but String[1]
You need to manually go through your code and find places where it uses arrays to represent strings.
You can convert a c style string in an array to a (unicode) string by using String MyVariable = String(PointerToCharArray);
You can convert your String variable to a pointer to w_char using w_char *MyPointer = MyVariable.c_str()
If you need to get a c style (8 bit char) pointer from a unicode string, use
w_char *MyCStringPointer = AnsiString(MyVariable).c_str();
I've converted LOADS of C++ builder 6 projects to the unicode and it's not normally that tricky.
Good luck.
Regards Roger

Read More...

Roger Cigol replied to the topic 'rand() is acting like a comedian today' in the forum. 2 days ago

Hi Gary,
Bjarne Stroustrup - The C++ Programming Language 3rd Edition Published Addison-Wesley
States:
rand() produces as pseudo random no. between 0 and RAND_MAX
and that you need to seed it using a call to srand(unsigned int i).
So your code is doing what I would expect.
Bjarne Stroustrup - Programming Principles and Practice Using C++ - 1st Edition Published Addison-Wesley
Suggests creating a function:
int rand_int(int max) { return rand() % max; }
and using this (in your case: value = rand_int(8);
In this later reference Mr Stroustrup also warns of some of the potential dangers of using rand(). His suggestion is to look at Boost::random.
Hope this helps.
Regards, Roger

Read More...

Roger Cigol replied to the topic 'Borland Delphi 6 manual uninstall' in the forum. 7 days ago

Hi Pierre,
I'm not sure that Delphi 6 can be made to run on Windows 10. I am sure that there is little point in trying to run such an old product on Windows 10 (or on anything?).
I do still run C++ Builder 6 on an old Win XP machine here to support legacy applications. But I can't remember the last time I actually started it up.
The latest version of Delphi is a huge world away from Delphi 6.
Sorry, but I don't think I can help you further with this, but will be interested to know if you manage to get it going.
Regards, Roger.

Read More...

Roger Cigol replied to the topic 'Borland Delphi 6 manual uninstall' in the forum. 7 days ago

Hi Pierre,
I wonder if you are approaching this problem from the wrong angle.
What are you trying to do AFTER you have uninstalled Delphi 6 that is not working correctly? Better to worry about this rather than worrying about what may (or may not) be left behind when you uninstalled Delphi 6.
Regards, Roger

Read More...

Roger Cigol replied to the topic 'REST/JSON (TRESTClient) copy to SQLite (TFDTable)' in the forum. 2 weeks ago

Hi Zach,
That's a very interesting point you have raised.
I have only used TFDBatchMove in a separate thread in a Windows system so this problem has been unnoticed by me.
I will see if I can get an Embarcdero database expert to comment.
Regards Roger.

Read More...

Roger Cigol replied to the topic 'PasMgr Unit - Does anyone know what this is?' in the forum. 2 weeks ago

Hi Colin,
That directory C:\Dev\FM\Progs\
looks suspiciously like one that you or another pc user has created, rather than being specific to Embarcadero.
I suspect you have got this left over in the project file from some previous project
When I have a problem like this I quite often solve it by opening up the project file using notepad and searching for the offending directory and/or file. Then manually delete it using notepad. A hack I know and probably not officially recommended!
Regards, Roger

Read More...

Roger Cigol replied to the topic 'REST/JSON (TRESTClient) copy to SQLite (TFDTable)' in the forum. 2 weeks ago

Hi Serge,
The right tool for this task is TFDBatchMove (along with TFDBatchMoveDataSetReader and TFDBatchMoveDataSetWriter).
Regards, Roger

Read More...

Roger Cigol replied to the topic 'McKeeth's statement of future direction' in the forum. 2 weeks ago

I too found this hard to get into. I had to click on one of the contibutors profiles and then click on their comment to get into the actual topic.
Regards, Roger.

Read More...

Roger Cigol replied to the topic 'First Run property at delphi rad studio' in the forum. 2 weeks ago

This is relatively easy to do if you are not particularly worried about the "30 days" limit being defeated by hacking.
It's surprisingly complicated to do if (as is usually case) you want to make it very difficult to hack.
The most difficult bit is designing the system that detects if it is the first ever installation. Otherwise the easy hack is to simply delete all the files and registry entries and reinstall it.
Regards, Roger

Read More...

Roger Cigol replied to the topic 'Correct or improve the code formatter of forum' in the forum. 3 weeks ago

I agree, It would be good if Embarcadero could address this issue with some urgency. I pasted a working example of C++ code to help someone on the forum and the formatter changed it so it didn't compile. Made me look a fool and didn't help the person I was trying to help.
Come on Embarcadero !
Regards, Roger

Read More...

Roger Cigol replied to the topic 'Please FIX FORUM!' in the forum. 3 weeks ago

Hi Bill,

See Jim McKeeth's comments

https://community.embarcadero.com/article/16590-server-maintenance-and-future-enhancements

I have emailed Jim saying that it's good to get his report but that it needs to now be fixed quickly!

Regarding "tone" - some people like to shout. It makes them feel better. My own experience is that it rarely helps get results and if it's results you want, politeness and respectfulness combined with firm assertiveness might be something you could try.

I like shouting at football and rugby matches, makes the beer afterwards even more enjoyable.

Regards, Roger

Read More...

Roger Cigol replied to the topic 'Trouble accessing Docwiki' in the forum. 3 weeks ago

Hi Richard,
See Jim McKeeth's comments
https://community.embarcadero.com/article/16590-server-maintenance-and-future-enhancements
I have emailed Jim saying that it's good to get his report but that it needs to now be fixed quickly!
Regards, Roger

Read More...