[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 264: mysqli_fetch_assoc(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 326: mysqli_free_result(): Couldn't fetch mysqli_result
Pete's QBASIC Site Discuss QBasic, Freebasic, QB64 and more 2008-04-07T00:34:07-05:00 http://www.petesqbsite.com/phpBB3/app.php/feed/topic/2560 2008-04-07T00:34:07-05:00 2008-04-07T00:34:07-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=17015#p17015 <![CDATA[pointers..]]>
omg.. those things make my head spin..

i 'ate em... oi..

<.<

Too bad I'm going to have to suffer and learn to use them cause they are in Freebasic now..

Kiyote

Statistics: Posted by Kiyotewolf — Mon Apr 07, 2008 12:34 am


]]>
2008-03-24T01:15:46-05:00 2008-03-24T01:15:46-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16854#p16854 <![CDATA[What are some applications for pointers?]]>
mysub myvariable

passes myvariable by reference. If the sub changes it, it is changed for the caller as well. myvariable must be of the appropriate type.

mysub (myvariable) 'contained in parentheses

it becomes an expression that is passed by value instead of a variable passed by reference. a the value is stored in a local variable for the sub. myvariable is not being passed, so does not have to be of the same type.

Ordinarily, a procedure's local variables fall out of scope when the procedure returns. When a SUB is STATIC, its local variables do not fall out of scope, and are not erased between calls.

Be careful about relying on the addresses of variables remaining fixed. QBASIC can and does move string descriptors. I don't know if it moves numeric variables...

http://support.microsoft.com/kb/12337/en-us

The article seems to imply that string descriptors are contiguous with the strings themselves, and I don't believe they always are. There are other interesting knowledge base articles on related subjects.

here are some other good articles:
http://support.microsoft.com/kb/51501/en-us
http://support.microsoft.com/kb/71275/en-us

Regards,
Michael

Statistics: Posted by Michael Calkins — Mon Mar 24, 2008 1:15 am


]]>
2008-02-16T17:19:34-05:00 2008-02-16T17:19:34-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16679#p16679 <![CDATA[sorry]]>
Ted

Statistics: Posted by burger2227 — Sat Feb 16, 2008 5:19 pm


]]>
2008-02-16T16:58:57-05:00 2008-02-16T16:58:57-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16678#p16678 <![CDATA[What are some applications for pointers?]]> Statistics: Posted by MystikShadows — Sat Feb 16, 2008 4:58 pm


]]>
2008-02-16T16:31:39-05:00 2008-02-16T16:31:39-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16677#p16677 <![CDATA[Re: memory]]>
Another way to manage memory is to make your function or sub variables STATIC. That way, the variable is erased on exit.

Ted
I always thought STATIC preserved the value stored in the variable if the procedure or function is exited, then called again.
Correct me if I'm wrong.

Statistics: Posted by Nemesis — Sat Feb 16, 2008 4:31 pm


]]>
2008-02-16T08:08:02-05:00 2008-02-16T08:08:02-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16675#p16675 <![CDATA[What are some applications for pointers?]]> Statistics: Posted by Mentat — Sat Feb 16, 2008 8:08 am


]]>
2008-02-16T05:42:58-05:00 2008-02-16T05:42:58-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16674#p16674 <![CDATA[memory]]>
Ted

Statistics: Posted by burger2227 — Sat Feb 16, 2008 5:42 am


]]>
2008-02-15T23:52:37-05:00 2008-02-15T23:52:37-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16673#p16673 <![CDATA[What are some applications for pointers?]]>
http://publib.boulder.ibm.com/infocente ... ptrdec.htm

https://www.cs.tcd.ie/Martin.Emms/NLP/C ... ode54.html

Personally speaking, I find pointers especially helpful in saving program memory. Instead of functions creating copies of variables every time they're called, you can just pass the address of the variable or complex data type to the function so that the function can manipulate the variable directly.

One thing that is unique to pointers is that you can actually have pointers to pointers. This actually presents the potential for wasting memory, but it's got some useful applications that can't really be easily performed without pointers. See the following links for more info on pointers to pointers.

http://www.eskimo.com/~scs/cclass/int/sx8.html

http://computer.howstuffworks.com/c32.htm

Statistics: Posted by Stoves — Fri Feb 15, 2008 11:52 pm


]]>
2008-01-12T10:34:10-05:00 2008-01-12T10:34:10-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16355#p16355 <![CDATA[What are some applications for pointers?]]> Statistics: Posted by Codemss — Sat Jan 12, 2008 10:34 am


]]>
2008-01-08T07:13:17-05:00 2008-01-08T07:13:17-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16289#p16289 <![CDATA[What are some applications for pointers?]]> Statistics: Posted by Mentat — Tue Jan 08, 2008 7:13 am


]]>