You can't perform calculations on a string
Laugh in C
You can't perform calculations on a string
Laugh in C
In computing, whole numbers are referred to as integers
they are known as integers outside of computing too lol
Yeah, but in computing (well, specifically the language this slide is about) they're referred to as integers and not referred to as "whole numbers" or any other synonym. If you're looking up something to do with integers in the documentation, you need to have the word "integer" in your vocabulary as "the" way to refer to numbers without decimal places to find what you're looking for. Same way you need to know "string" instead of "word" or "text field" or "sentence".
JavaScript trying to look nonchalant in the corner.
Amazingly you can store all sorts of things in variables.
Including nothing. Actually, depending on the language, multiple types of nothing (null vs uninitialized)
actually, you can even store pointers to nothing in memory. you just do:
void x;
void* x_ptr = &x;
then you can use it to invoke functions that take no arguments like this:
void open_texteditor (void editor_choice)
{
// do nothing with the editor_choice because there is only one sensible editor
open_nano();
return void;
}
void favorite_texteditor;
void result = open_texteditor(favorite_texteditor);
print_error_on_bad_result(result);
(note that this is a joke comment)
This has made a lot of people very angry and been widely regarded as a bad move.
I mean, in Python, Int() literally is a pre - formed function for per - forming math on strings.
You can very much perform calculations on strings, and its a very cool thing, but i think thats wayyy above the level that this presentation is meant for cause you probably should know what integers are before that, even outside of programming...
This is programming 101 from which century?
does it say programming 101 somewhere
No programming 101 is what happens when you perform calculations on a string.
Please do try to keep up.
Is it all right to postform calculations on a string?
all 27 comments