Originally posted by NickFitz
View Post
- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Pimps getting creative
Collapse
X
-
Won't print 0 though, probably not anyway. It'll print whatever is lurking around the stack as an integer.Will work inside IR35. Or for food. -
In the very dim and distant past when I actually coded stuff, I seem to remember that printf will grab the last matching variable off the stack if not told otherwise. So printf(%d) would grab the last integer value from the stack, since that seems to be i as passed to try() then it uses that. Slopping coding but it works.Originally posted by NickFitz View PostBTW, Suity is correct about the printf in the try function: GCC gives a warning that there are more placeholders than variables. Obviously, i should also be mentioned in that call
Of course I could be entirely wonrg / out of date."Being nice costs nothing and sometimes gets you extra bacon" - Pondlife.Comment
-
I'm also getting a warning at
"Implicit conversion loses integer precision: 'long' to 'int'"Code:index = strtol(argv[1], NULL, 10);
Maybe they're assuming a 32-bit system?
Comment
-
I haven't sought to leave it yetOriginally posted by FatLazyContractor View Post
Did you say that you are still on bench ?!!!
Comment
-
gcc -m32 is targetting it for a 32 bit system isnt it?Originally posted by NickFitz View PostI'm also getting a warning at
"Implicit conversion loses integer precision: 'long' to 'int'"Code:index = strtol(argv[1], NULL, 10);
Maybe they're assuming a 32-bit system?
"Being nice costs nothing and sometimes gets you extra bacon" - Pondlife.Comment
-
It outputs the Steam Key for Samantha Fox Strip Poker, can I have my GCHQ code breaker job now please ?Comment
-
Dunno ¯\_(ツ)_/¯Originally posted by DaveB View Postgcc -m32 is targetting it for a 32 bit system isnt it?
I went from various assembly languages and Forth directly to JavaScript; I never did anything with C, so I only really know as much of it as I need to work in Objective C. Things like gcc command-line options are not within my ambit
As I'm looking at it in Xcode, the warnings will be from clang, so maybe gcc wouldn't mind that bit.Comment
-
I may have mentioned that tbl is an array of function pointers in the post before yours. Why not pop over and take a look?Originally posted by VectraMan View PostEh? tbl is an array of function pointers that take one argument. So that's fine. I guess try is okay in C because it's a keyword in C++.
Is there more to it than 5?
My C coding days are long behind me, so don't judge too harshly.Knock first as I might be balancing my chakras.Comment
-
Progressed onto D now?Originally posted by suityou01 View PostMy C coding days are long behind me, so don't judge too harshly.
“Brexit is having a wee in the middle of the room at a house party because nobody is talking to you, and then complaining about the smell.”Comment
-
Seesh harp.Originally posted by darmstadt View PostProgressed onto D now?
Knock first as I might be balancing my chakras.Comment
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- IT contractor demand climbed in August 2026 to 40-month high Today 04:53
- 5 steps before your client ‘does a Foreign Office’ and puts 90% of contractors inside IR35 Yesterday 01:11
- Luke’s Story: “I knew it was a loan. But they changed the rules.” Sep 23 00:00
- I registered my company with my home address. Whoops. Here's what Companies House shows the world about you Sep 22 13:06
- The Tories’ three IR35 replacement options — but contractors are right to be sceptical Sep 22 03:51
- Conservatives to replace IR35 outright, Griffith vows — advisers who met him reveal what it should contain Sep 21 05:06
- HMRC’s tax calculation errors: why contractors must check their bill now Sep 17 05:14
- HMRC names 12 loan charge-type schemes, one with ‘Tardis’ clause Sep 15 00:12
- Inside IR35 contractors as zero-hours reform victims is why Kate Dearden must meet us Sep 14 06:37
- Simple Assessment letters: How ex-Personal Service Companies are on HMRC’s radar Sep 11 12:16

Comment