With my work schedule getting messed up for today, I've decided to do some work on my MTAFile program. Instead of working my normal 7am to 4pm, they want me to work overnight, in preparation for inventory. So, I'll be working 10pm to 7am... :(
With my work schedule getting messed up for today, I've decided to do
some work on my MTAFile program. Instead of working my normal 7am to
4pm, they want me to work overnight, in preparation for inventory. So, I'll be working 10pm to 7am... :(
Sorry to hear that. That happens to me too every year when the temps
peak in the summer. The tempurature in the foundry where I work gets to hot to work so they move my shift (afternoons) to the night shift.
I really hate getting home and trying to sleep at 8 in the morning.
Bummer Dan... I woke up at 5.30am today, was ready to leave for work at 7am and started at 8am this morning,will leave work early today as my
day is also kinda messed up... darn body clock..
At least it's only for one day... I don't know if my body could handle working nights for an extended period of time anymore... :)
In the middle of the afternoon, it could reach temps of 140F (60C). They even tried working 30 minutes on and 30 minutes off...
Anyway, I've been trying to get the program to sort the output in alphabetical order, first by the file echo name, then by the filename. I've been having some issues in accomplishing this.
The program is reading the .tic files, and storing them in an array of records. The record definition is as follows:
I have tried using a couple different sort methods, but I don't think
they are working well with strings, instead of integers.
I have even thought about adding an 'areaorder:integer' and 'fileorder:integer' into the records, and writing a procedure to insert numbers by the alphabetically order. This was also giving me the red-ass...
What Sort method you used? How do you do the comparison of the strings
to see which is first and which is second, alphabetically?
A simple way is to use the ord function for the first character of each string and if its numerical value is greater, sort it accordingly. In pseudocode:
if ord(value1[1]) > value2[1]) then reverse_order else leave_it;
If you dont care about capital or small letters, convert all strings to capital letters.
If you are using FreePascal, i am sure it has some libraries/objects to
do sorting, with the Bubble sort method, i think.
I was just using < and >.
if upcase(tic[d].area) < upcase(tic[z].area then ...
I was just using < and >.
if upcase(tic[d].area) < upcase(tic[z].area then ...
In Freepascal that should also work... Are you sure that the problem is
the comparison and not, for example, the record exchange? For example if tic[d] needs to exchange position with the tic[z] record, you must use a temp record to successful do the exchange like this:
tmp = tic[z]; tic[z]:=tic[a]; tic[a]:=tmp;
Also you must do the comparisons approximately n^2 times, to fully sort the array of records you have.. where n is the size of the array/list of
records you have. In this page you can see a complete example for string comparison in records. Check the Sort procedure. Its not the ideal algorithm for too many items.
Al wrote to Black Panther <=-
That is extreme. If the temps here aproach 50C thay start to think
about shutting down. If it goes above 55C they will shut it down.
I find working in temps above 45C hard to handle. Someone at my foundry died of heat stroke before I started there so they take it very
seriously.
Try 50C+ It's tough and you can only do it 10-15 minutes at a time, before taking a rest at least as long in cool conditions or in a rehab chair to bring the body temperature back down again. I did it couple of times in my late teens/early 20s in a malfunctioning wood drying kiln. Luckily, it was the middle of winter, with the outside temperature around 0-5C, which helped with maintaining a reasonable body temperature during rest breaks.
It was aprox. 36C in my work area today. I suppose that will go up as summer moves in.. :)
Had a heat stroke incident today at work, someone I was training had to spend a few hours in the first aid room. He was overdressed. His usual
job requires coveralls so that is what he was wearing. Not a good idea
in my area. The pouring floor on my left and the heat treat ovens on my right.
Aside from the first aid room there is no cool place at the foundry to cool off. The best we can do is find a bit of shade.. hard to do here in the summer.
Wow that's hot it got to 12C today...
Poor fellow... that's a tough introduction to the new work area.
You're welcome to my 9C high forecast for tomorrow!
Al wrote to Vk3jed <=-
It was aprox. 36C in my work area today. I suppose that will go up as summer moves in.. :)
Had a heat stroke incident today at work, someone I was training had to spend a few hours in the first aid room. He was overdressed. His usual
job requires coveralls so that is what he was wearing. Not a good idea
in my area. The pouring floor on my left and the heat treat ovens on my right.
Aside from the first aid room there is no cool place at the foundry to cool off. The best we can do is find a bit of shade.. hard to do here
in the summer.
I think here the workplace safety regulators would have something to say. There would certainly be a Worksafe investigation if it was a major health incident.
Al wrote to Vk3jed <=-
Worksafe knows us well. They are here frequently making sure things are
up to standards. We have had incidents here, a fire a few years ago on
the melt deck that we all lost a few days work over but no one was
hurt.
This one wasn't major though. The worker just needed to lose his
coveralls and cool down then he was back to work although on light
duty.
There is one cool place I forgot about. The lunch room is cool in
summer and warm in winter. I rarely use it myself because I prefer to
go outdoors and get some fresh air on my breaks.
Sysop: | Weed Hopper |
---|---|
Location: | Clearwater, FL |
Users: | 12 |
Nodes: | 6 (0 / 6) |
Uptime: | 13:35:02 |
Calls: | 114 |
Files: | 50,350 |
D/L today: |
57 files (9,999K bytes) |
Messages: | 297,733 |