char * cpystr(const char * source, char * destination) { return strcpy(destination, source); }
-
-
-
@qntm Compose "str", "cpy" and optional "n" in any order to produce the desired function, much like Lisp's cddr, cadar etc.
End of conversation
New conversation -
-
-
@qntm to form an analogy with integer assignment int a = b; strcpy(a, b); -
@zarawesome But every other copy command in the entire universe has the form "copy SRC DEST" - 1 more reply
New conversation -
-
-
@qntm Probably: dest = source; strcpy(dest, source); -
@jcalsbeek On my old graphing calculator, variable assignment used the syntax `10->A`. Always made more sense to me - 1 more reply
New conversation -
-
-
@qntm it was designed by the same person who did `ln`.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@qntm because they're not the arguments for strcpy, they're really arguments *against* strcpyThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@qntm strcpy returns destination. Maybe it was designed for an ABI where the return value is in the same location as the first argument.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@qntm By analogy to the assignment operator (or at least, that's how I think of it)Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.