Interviewer And Interviewee Guide

Coding Standards Interview Question:

Explain Naming Convention in Module-level variables (member-vars)?

Submitted by: Administrator
Description
If variables are placed outside a function body their scope will be different from a local scope variable, therefore we flag those variables with a prefix "m_" that is very common in object oriented languages even though SQABasic is not an object oriented programming language.

Syntax
"m_" + [Prefix]+[ShortDescription]

[Prefix] is a lowercase letter (either "n", s", "str", "d" or "t" appropriate to the type it represents) [ShortDescription] is a corresponding name of what the variable stands for. If [ShortDescription] consists of more then one word these are all separated using a capital letter for each new word.

Examples
· m_nCountDatabaseRecords
· m_strLastname
· m_sPassword
Submitted by: Administrator

Read Online Coding Standards Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.