length region $10. segment $40. long_run real_bad c cv_95 cv_99 8. cv_accuracy $6.;
what can c be here? constant? it does not look like be a var name
I try google and read sas doc, dont even know where to start..
please kindly assist thank.
Why don't you just submit it before googling it anyway?
Since it is described in the length statement, it is a space-separated declaration of a variable, or variables and lengths.
code:
data a;
length
region $10.
segment $40.
long_run real_bad c
cv_95 cv_99 8.
cv_accuracy $6.;
run;
proc contents;run;
results:
The only strange things there are the poor formatting and the inclusion of periods in the length values. The lengths of SAS variables are always integer so the decimal point is not needed. Including it makes the lengths look like they are formats. Formats are a totally different concept than length.
length region $10 segment $40 long_run real_bad c cv_95 cv_99 8 cv_accuracy $6;
What makes you think C cannot be a variable name? The rules for basic variable names are 1) must start with a letter or the underscore character, 2) following characters have to be letters, digits or the underscore character. Since C starts with a letter that is enough as there are no other characters.
Since C here is numeric, it might be the C involved with physics, or any value you might want to assign a constant to somewhere in the code, or something else obvious to the coder.
While I might question the coding style that uses variables such as "______" that is still a valid variable name (or data set name for that matter).
Sometimes the names are very descriptive but not obvious to anyone else. From a class I took comes the variable twopi
Obvious name?
Maybe you have the mind that would make the not-obvious-to-me connection that the value is something near "2 times Pi".
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: