last day (15 days later) » 

16:44
0
A: Print a Tabula Recta!

VisualMelonC#, 100 bytes Supplied because I think the other C# answer is invalid, and this is a different way of generating the table entirely. Full program because I don't like supplying just functions... and because it's 100bytes. Appears to use the same method as the VBA answer provided by Joffan. cl...

i++<702; instead of i<702;i++ for -1. Main(i){for(; instead of Main(){for(int i=0; for -10?
@EʀɪᴋᴛʜᴇGᴏʟғᴇʀ The first one isn't so simple, because we need to start at i=-1 instead, which just adds the byte back (we have to start a 0 because we are doing modulo). The second doesn't work, because C# doesn't guess types like C, and requires variables to be assigned before use (including primatives)
Suffix incrementation does not return the incremented value, it returns the value before incrementation. If int i is equal to 16, i++ would return 16, not 17.
@EʀɪᴋᴛʜᴇGᴏʟғᴇʀ sorry, not sure I follow... it's i=0 so that the first value of i in the loop is 0 (so we get the alphabet proper, starting at 'A' - it's expensive to offset the modulus because it adds brackets). I am well acquainted with i++ and ++i, and note that they are well defined in C# (unlike C, I gather). I can't have the ++ in the i%27 because I need the same i in the i%26 (this will be the incremented value in C#, because it's to the right of the ++). This is why it would be nice to turn it around, and do a lookup on the value, so that the ++ can be at the end.
At least you can surely save a byte using i++<702; instead of i<702;i++. Are you sure i++ returns incremented i instead of i? ( ) Yes ( ) No [Submit]
16:44
@EʀɪᴋᴛʜᴇGᴏʟғᴇʀ no, as stated before, this would require i=-1 initially (as the condition is evaluated before running anything inside the loop), which wastes the byte, else we can't start the loop at i=0, which we need to for this method to work sensibly.
Good day
If i == 0, then i++ == 0. Afterwards, i == 1.
yes
If we start at i=0, and then perform the comparison i++<702, then we end up with i == 1 afterwards
this means the first iteration of the look is for i=1
which isn't going to end well (we end up with the Table starting with BCD... instead of ABC..)
the only way I can think of moving that ++ is to turn the thing into a lookup, or by multiplying by ((i++%27)/26) or similar, and these are all relatively expensive compared to the ternary conditional.
Oh, I think it finally clicked to me. So, you can do for(int i=0;i<702;) and replace i%26+65 with i++%26+65. Still, -1
@VisualMelon Actually, I can't have a "Good day", it's alerady afternoon (or, night, I suppose) where I am.
16:53
hehe, sorry
I say "Good day" all day every day
consider it "I hope you had a good day"
sorry, when I said yeah, I was wrong
(misread what you'd written completely)
ternary conditional is short-circuiting, so it won't increment when it prints a line-feed
if we turn it into a lookup, then not only can we force evaluation of that, which is nice, it means we can then use the i+1 value for the %27, and look for <1 rather than > 26, but I don't think it pays.
... scratch that last, you have to sign it for the lookup (duh), so that doesn't make sense
Well, I've found another one (sorry, still does not work as expected!): i++%27>25
aye, that's the obvious one, but it breaks the i++%26
it costs a lot more to fix than it saves at that point
are you a C golfer/user?
Mainly "user", but I also golf in it, although lately it's ungolfed...

last day (15 days later) »