and where "n" is the number of parameters in the DEFINE MATERIAL command:
name: name of the surface.
type: type of the surface. The actual number (n) of parameters that define the surface is different, depending on the type.
The meaning of the parameters and their limits are explained in the examples’ comments.
0: general definition, n=16,
1: simple definition, n=9 (extra parameters are constants or calculated from given values),
2-7: predefined surface types, n=3.
The three values are the RGB components of the surface color. Other parameters are constants or calculated from the color.
10: general definition with fill parameter, n=17,
11: simple definition with fill parameter, n=10,
12-17: predefined surface types with fill parameter, n=4,
20: general definition with fill, color index of fill and index of texture parameters, n=19,
21: simple definition with fill, color index of fill and index of texture parameters, n=12,
22-27: predefined surface types with fill, color index of fill and index of texture parameters, n=6.
20-27: Special meanings for types 20-27: If the pen number is zero, vectorial hatches will be generated with the active pen.
Zero value for a texture or fill index allows you to define surfaces without a vectorial hatch or texture.
You are right, the GetType function can return any values from the GDL command. The type parameter greater than 7 defines not only the type of the material, but the behavior of the GDL command as well. For example type 20 means that the command need to specify only fill, color index of fill and index of texture parameters. The documentation also says that it creates a general material, so I think in this case you should use general.
Just out of curiosity: what are you planning to use material type for? A use case would help us to make this interface more clear if needed.