www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - NOOB Questions about this language

reply "Wh1t3gh0st" <ngalewski gmail.com> writes:
Simple questions I know, but it is kinda hard looking for most of 
this stuff online, so I was wondering if an expert or programmer 
well versed in the D language could answer me some informative 
data about this language thanks!


Can anyone give me a list of ALL the types of primitive variables 
for this language or show me where to go?

Also if anyone can answer this can you also tell me if what 
category they would fall into, like in C++ a bool would be a 
boolean or char is mapping and short, int, and long are integer. 
Like that.

Can anyone tell me if this language uses static, dynamic, or both 
scoping?

Oh and does the D language have non-primitive data types?

Does this language have a string type and if so is it static, 
dynamic with a fixed maximum length, or dynamic with no maximum 
lenght.

Finally does this language allow single-dimisional, 
multidimensional arrays, or no arrays at all?

Thanks again.
Apr 22 2013
next sibling parent =?UTF-8?B?QWxpIMOHZWhyZWxp?= <acehreli yahoo.com> writes:
On 04/22/2013 04:45 PM, Wh1t3gh0st wrote:

 Can anyone give me a list of ALL the types of primitive variables for
 this language or show me where to go?

 Also if anyone can answer this can you also tell me if what category
 they would fall into, like in C++ a bool would be a boolean or char is
 mapping and short, int, and long are integer. Like that.

This page should be sufficient: http://dlang.org/type.html The complex and imaginary types will not be supported for long because they will be replaced with library solutions in the future.
 Can anyone tell me if this language uses static, dynamic, or both 

Static.
 Oh and does the D language have non-primitive data types?

'struct' and 'class' with different capabilities. This page has a comparison: http://dlang.org/struct.html
 Does this language have a string type

Yes.
 and if so is it static, dynamic

Bot.
 with a fixed maximum length

Static arrays have exact length.
, or dynamic with no maximum lenght.

Yes. There is also associative arrays.
 Finally does this language allow single-dimisional, multidimensional
 arrays, or no arrays at all?

There are static (aka fixed-length) arrays and there are dynamic arrays. The latter is also known as 'slice'. No native support for multi-dimensional arrays but arrays of arrays (or slices of slices) are multi-dimensional. strings are slices of Unicode code units. Most common is the 'string' type, which is nothing but a slice of UTF-8 code units, but strings can be of UTF-16 and UTF-32 code units. strings are under "Special Array Types" on this page: http://dlang.org/arrays.html There is also the following article that goes into details of slices: http://dlang.org/d-array-article.html Ali
Apr 22 2013
prev sibling parent "Wh1t3gh0st" <ngalewski gmail.com> writes:
Thanks Ali!
Apr 22 2013