So in the end, this is just saying allocate me as many bytes s1 as were needed to store s1 itself.
最终,这个只是表示给我分配,足够多的空间来存储。
I've got some internal variables I have to store, what kinds of things do I have to keep track of?
计算的时候需要占用多少内存,我需要存储一些内部变量,我需要记录哪些东西呢?
If I am talking something about the Bohr model and you start giving me some core dump about what you know about the Bohr model, it doesn't go by the pound.
如果我讨论一些关于波尔模型的东西,于是你开始给我一些内核存储,关于你所了解的波尔模型,这是没有用的。
I get the int and store it in n. The switch statement takes inside its parenthesis an int or a char or some primitive type.
我得到一个整数并把它存储,到n中,switch语句的圆括号里可以是一个整数,或者一个字符或其他的基本类型。
I want-- I know I'm running you slightly over, I want to do one last example, it's, I also want to be able to do, have variables to store things.
我想-我知道讲的有点多了,我想给大家看最后一个例子,这里我想做的是,通过变量来存储东西。
What that means, in a stored-program computer, is that I can provide to the computer a sequence of instructions describing the process I want it to execute.
它的意思就是说,我可以给一个存储程序计算机,提供一系列,描述我希望,能执行的过程的指令。
And then somewhere along the line, I decide to store things in a different representation.
但是随后的一些地方,我决定在不同的,表现形式中存储值。
Now, to my knowledge, most implementations of Python use this way of storing lists, whereas Lisp and Scheme do not.
这正是我希望的,据我所知,Python,的大多数实现,都是用这种方式来存储数组的,而Lisp和Scheme则不是。
Now at this point in the story, I've got a variable called n. I've stored it in int.
现在这个故事的这里,我获得了一个变量n,我把它存储成int型的。
I store in s1 the address of the first byte that the user typed in and by the way that first bite happens to live in this new place called the heap and that's the only update to the story thus far.
我在s1中存储的是用户输入的字符串的首地址,这样第一个字节存储在这块,新的堆的地方,这个是唯一的修正。
And in fact, it depends on how I store a list.
实际上,它依赖于我怎么存储这个数组的。
Now if you look at that list, there is actually something I didn't seem to check, which is, I said I wanted a float stored in hyp.
看下上面的清单,实际上我还有一些东西忘了检查,也就是说hyp中存储的,应该是浮点数类型。
And I'm storing the answer in a variable called "answer" that's of type float.
我把这个答案存储在一个float类型的,叫做“answer“的变量中。
It's reasonable because it's meant TMP for temporary purposes just to call it temp or T-M-P for short, X and I can define temp as -- why don't I set it as equal to X, initially, because now that I've stored X in a separate chunk of memory, I can now change its value and then I can say Y gets, not X, but temp, and so now I've actually swapped these values.
这是合理的,因为它是为,暂时的目的,只要叫它Temp或简称它为,我可以定义temp为--为什么我不把它设定为等于,最初的,因为现在我把X存储在一个单独的内存块中,我现在可以改变它的值,然后我说Y等于,不是X,而是temp,所以现在我交换这些值。
应用推荐