Ejemplo n.º 1
0
        public static string GetVariableDeclaration(string name, eVariableType variabletype, string InitComment = null, string defaultValue = null)
        {
            var sb = new StringBuilder();

            if (!string.IsNullOrEmpty(InitComment))
            {
                sb.AppendLine($"  {InitComment}");
            }
            sb.Append($"  {name} {variabletype}");
            if (variabletype == eVariableType.varchar2)
            {
                sb.Append("(100)");
            }
            if (!string.IsNullOrEmpty(defaultValue))
            {
                sb.Append($" default {defaultValue}");
            }
            sb.Append(";\r\n");
            return(sb.ToString());
        }
Ejemplo n.º 2
0
 public IVariableDefImpl(string name, eVariableType variableType)
     : base(name, eNodeType.VarDefinition)
 {
     _Name = name;
     (this as IVariableDef).VariableType = variableType;
 }