예제 #1
0
        private string Getter(string source)
        {
            var dest = DestinationSelecter.IsCommand(source);

            if (dest == SelfLanguageDestination.Ram)   //is a Ram source
            {
                return(HandleFromRam(source));
            }
            else if (dest == SelfLanguageDestination.Here)     //TODO
            {
                return(source.Replace("^", ""));
            }
            else if (dest == SelfLanguageDestination.Stack)     //Could be buggy cause of a R containing a -? keep the order this way
            {
                return(Convert.ToString(CommandStackCarry.Pop()));
            }
            else if (dest == SelfLanguageDestination.Number)
            {
                return(HandleFromMemory(Convert.ToInt32(source)));
            }
            else if (dest == SelfLanguageDestination.Compare)
            {
                return(Convert.ToString(Compare(source)));
            }
            else if (dest == SelfLanguageDestination.None)
            {
                throw new InvalidGetterException(string.Format("The get operation with the > {0} < source is not valid", source));
            }
            else
            {
                throw new NotImplementedException(); //HTF
            }
        }
예제 #2
0
 /// <summary>
 /// Write using the GenericLog a Log Object
 /// </summary>
 private void WriteValueCarry()
 {
     GenericLog(new Logging(Convert.ToString((char)CommandStackCarry.Pop()), _pointer));
 }