This class of status codes indicates the action requested by the client was received, understood, and accepted
$CURRENTDIR/filename
not $USERDIR/filename
$CURRENTDIR/filename
not $USERDIR/filename
add_path $CURRENTDIR
at the top of storage.cfg I think$CURRENTDIR/filename
not $USERDIR/filename
1. One man's constant is another man's variable.
2. Functions delay binding; data structures induce binding. Moral: Structure data late in the programming process.
3. Syntactic sugar causes cancer of the semicolon.
4. Every program is a part of some other program and rarely fits.
5. If a program manipulates a large amount of data, it does so in a small number of ways.
6. Symmetry is a complexity-reducing concept (co-routines include subroutines); seek it everywhere.
7. It is easier to write an incorrect program than understand a correct one.
8. A programming language is low level when its programs require attention to the irrelevant.
9. It is better to have 100 functions operate on one data structure than 10 functions on 10 data structures.
10. Get into a rut early: Do the same process the same way. Accumulate idioms. Standardize. The only difference(!) between Shakespeare and you was the size of his idiom list - not the size of his vocabulary.
11. If you have a procedure with ten parameters, you probably missed some.
12. Recursion is the root of computation since it trades description for time.
....
GetConsoleMode
can fail with ERROR_INVALID_HANDLE
when redirecting output to nul
, which is considered a character file but cannot be used as a console.
foo!(
"foo",
"{x}",
"bar",
"{y}"
"baz",
x = 69
y = 72
);
is it possible in theory to write such a macro in rust? /load
to reduce possible side effects.
Follow up on #8220
foo!(
"foo",
"{x}",
"bar",
"{y}"
"baz",
x = 69
y = 72
);
is it possible in theory to write such a macro in rust? macro_rules! foo {
($x:expr, $y:expr) => {
println!("foo: {}, bar: {}", $x, $y);
};
}
fn main() {
foo!(69, 72);
}
output:
foo: 69, bar: 72
or do you want smth like:
fn main() {
let result = format!(
"{foo} {x} {bar} {y} {baz}",
foo = "foo",
x = 69,
bar = "bar",
y = 72,
baz = "baz"
);
println!("{}", result);
}
ouput:
foo 69 bar 72 baz (edited)macro_rules! foo {
($x:expr, $y:expr) => {
println!("foo: {}, bar: {}", $x, $y);
};
}
fn main() {
foo!(69, 72);
}
output:
foo: 69, bar: 72
or do you want smth like:
fn main() {
let result = format!(
"{foo} {x} {bar} {y} {baz}",
foo = "foo",
x = 69,
bar = "bar",
y = 72,
baz = "baz"
);
println!("{}", result);
}
ouput:
foo 69 bar 72 baz (edited)foo!(
"foo",
"{x}",
"bar",
"{y}"
"baz",
x = 69
y = 72
);
is it possible in theory to write such a macro in rust? macro_rules! foo {
($x:expr, $y:expr) => {
println!("foo: {}, bar: {}", $x, $y);
};
}
fn main() {
foo!(69, 72);
}
output:
foo: 69, bar: 72
or do you want smth like:
fn main() {
let result = format!(
"{foo} {x} {bar} {y} {baz}",
foo = "foo",
x = 69,
bar = "bar",
y = 72,
baz = "baz"
);
println!("{}", result);
}
ouput:
foo 69 bar 72 baz (edited)