Oxygen Basic

Programming => Problems & Solutions => Topic started by: Aurel on March 13, 2011, 01:54:29 AM

Title: What is asciiz ptr?
Post by: Aurel on March 13, 2011, 01:54:29 AM
Hi all..
I hope that my question is not stupid.
What exactly is :
 Dim cmdline as asciiz ptr
Is this string pointer or some sort of casting string as pointer?
Title: Re: What is asciiz ptr?
Post by: kryton9 on March 14, 2011, 01:51:27 PM
Aurel, I don't know for sure.... but my guess is it is an ascii (not supporting wide strings) string pointer that is terminated by a zero, or Null. How it works I have no idea?
Title: Re: What is asciiz ptr?
Post by: efgee on March 14, 2011, 03:34:19 PM
Aurel, I don't know for sure.... but my guess is it is an ascii (not supporting wide strings) string pointer that is terminated by a zero, or Null. How it works I have no idea?

ASCIIZ is an ascii string (character size is one byte) that is terminated with $0.
"cmdline" would become a pointer to such a string.
(a pointer does not need to be "terminated" as the length is always depending on the OS - 32 bit on a 32 bit OS, 64 bit on a 64 bit OS)

A pointer is a location in memory that holds the starting location of something else (in this case a string).
So the pointer "cmdline" only knows where the string is but not what the string's content is...
Title: Re: What is asciiz ptr?
Post by: Aurel on March 15, 2011, 12:01:44 AM
Thanks ..
So this is string pointer.