Search:

Type: Posts; User: patrink

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: Parsing code.

    by patrink
    Replies
    5
    Views
    1,519

    To be fair, its an interpreter, not a compiler....

    To be fair, its an interpreter, not a compiler. Compilers require even more code and even more time.

    Thanks for all the links though, I'll check them all out.
  2. Thread: Parsing code.

    by patrink
    Replies
    5
    Views
    1,519

    Parsing code.

    I started working on a small programming language as a spare time project and I have created most of the functions (for input, output, variables, etc) except for the first step (ie, parsing the...
  3. Replies
    14
    Views
    5,048

    After 2 cups of coffee I finally got it working....

    After 2 cups of coffee I finally got it working. I've just been working on ways to error handle it, but that's another story for another time.

    Again, thanks for your help.
  4. Replies
    14
    Views
    5,048

    This is quite embarrassing on my part that its...

    This is quite embarrassing on my part that its right on the wikipedia page...I need more coffee.
  5. Replies
    14
    Views
    5,048

    hrmm...am I really that tired that I thought *...

    hrmm...am I really that tired that I thought * and + are right associative? That basically solves everything. Thanks.
  6. Replies
    14
    Views
    5,048

    The only problem now is I don't know how to deal...

    The only problem now is I don't know how to deal with the + because it is right associative and it has the lowest precedence. Everything else works otherwise.

    According to wikipedia:

    either o1...
  7. Replies
    14
    Views
    5,048

    I'm having a little trouble implementing the...

    I'm having a little trouble implementing the operator part of the shunting-yard algorithm.

    It seems very straight forward, but every implementation I do, it doesn't seem to work as intended.
    ...
  8. Replies
    14
    Views
    5,048

    Thanks for the help. I'm actually thinking to do...

    Thanks for the help. I'm actually thinking to do this in C++, as stacks are already implemented there, and a try catch statement won't hurt.
  9. Replies
    14
    Views
    5,048

    Parsing to Reverse Polish Notation

    I wanted to make a Reverse Polish Notation calculator which would take in an input such as:

    (1 + 2 * 3) ^ 4 + 5 * (6 + 2)
    turn it into Reverse Polish Notation in the order of operations:

    1 2 3...
  10. Replies
    4
    Views
    913

    Thanks for all the input. I realized I'd get...

    Thanks for all the input. I realized I'd get criticized for misusing malloc (and not freeing) as much as I did, but in the beginning I needed it. As it stands so far, I can see why "int n = (int)...
  11. Replies
    4
    Views
    913

    Addition, but in strings.

    This is not a question per se, but instead asking for help to fix a proof-of-concept program.

    I wanted to do arithmetic on large numbers, but 32 bits aren't quite big enough, so I created a...
  12. Replies
    16
    Views
    3,065

    if you want to code how to calculate large...

    if you want to code how to calculate large numbers you will have to do one of two things:

    1.) Invest some time looking for Binary-coded decimal (BCD) code in C, and how to use it.

    2.) Create...
  13. Replies
    2
    Views
    4,131

    Capturing and saving a screenshot with GDI

    I don't know much about the GDI, but I heard it can take screenshots so I attempted to find a bit of code to do so. Problem is, after alot of debugging, I still have no idea why it isn't working.
    ...
  14. Replies
    7
    Views
    1,444

    Thanks for the reply. But after a few hours of...

    Thanks for the reply. But after a few hours of googling (because not only did I want to take a screenshot, but save it too), and messing with a bit of code, I managed to put this all...
  15. Replies
    7
    Views
    1,444

    at Quzah, I was just wondering if any shorter way...

    at Quzah, I was just wondering if any shorter way has been made....I know there are a few windows functions which make it easier...but to be honest, I'm still an amateur, I don't know exactly which...
  16. Replies
    7
    Views
    1,444

    Creating and saving images

    I have a a short question. I want to be able to take a screenshot of the desktop, without manually pressing print screen and save it to a file.

    Most of the resources that I have searched to do...
  17. you can use sys/timeb.h's timeb struct. If...

    you can use sys/timeb.h's timeb struct. If sys/timeb.h is unavailable, you can use Windows.h's SYSTEMTIME. Just replace "struct timeb" with "SYSTEMTIME" and "ftime" with "GetSystemTime". Then replace...
  18. Replies
    6
    Views
    1,921

    Just a tip, scanf separates strings when it...

    Just a tip, scanf separates strings when it encounters a space or newline (and maybe something else, correct me if I'm wrong)

    typing in:


    char Variable1[80], Variable2[80], Variable3[80];
    ...
  19. Replies
    1
    Views
    1,618

    Self Made C Scripting Language.

    Hey everyone, I have a few questions regarding creating my own scripting language.

    I'm having a bit of trouble when it comes to tokenizing the file (ie, the lexical analyzer). My first version,...
  20. Replies
    3
    Views
    1,091

    Yeah...sorry about that, I like to complicate...

    Yeah...sorry about that, I like to complicate things more than they should be.

    __BUFR is initialized in
    int String(char *__BUFR[], int __CHARS, int __SIZOF, int __CAPS)

    It (should) point to...
  21. Replies
    3
    Views
    1,091

    Problems with Pointers in functions.

    I've been working on a way to create a random generator for ints and chars, but eventually I gave up and started working on a way to make what was already available (rand() from cstdlib).

    I made...
  22. Replies
    3
    Views
    1,454

    The code you wrote needs to be refined a bit...

    The code you wrote needs to be refined a bit first before we get to the if statements.

    First of all, there is an extra left curly bracket above "int i" and one below "int div = 3", those should...
  23. Replies
    3
    Views
    2,491

    reading file then if statement not working

    I've been having a little problem with grabbing a word from a file then checking it using an if statement to see if it is true or not.
    when the code reaches the "printf("Line = ...." it prints out...
  24. Replies
    15
    Views
    6,699

    the atoi function in the stdio header file can...

    the atoi function in the stdio header file can return an int from a char then you can just add it up. You could try something like this:



    int sumfunc(int x, char y){
    z = x + atoi(y) /*...
  25. Replies
    22
    Views
    2,771

    I'm with CommonTater, two files should be used....

    I'm with CommonTater, two files should be used. here is some code that will read, find and replace, then remove the input file and rename the output file to the input.
    Disclaimer: i haven't tested...
Results 1 to 25 of 32
Page 1 of 2 1 2