+ Reply to Thread
Page 11 of 40
FirstFirst ... 9 10 11 12 13 21 ... LastLast
Results 101 to 110 of 399

Thread: Expression Gate Documentation

  1. #101
    Inactive Core Xii is on a distinguished road Core Xii's Avatar
    Join Date
    May 2007
    Location
    Finland
    Posts
    332

    Default

    Just a little flaw Core Xii, it would only flip once (first() -> ... [/b]
    What do you mean it flips only once? I set an interval!
    Grammar is the difference between [i]"helping your uncle, Jack, off his horse"[/i] and [i]"helping your uncle jack off his horse".[/i]

  2. #102
    Expressionism 2.0

    Syranide has disabled reputation Syranide's Avatar
    Join Date
    Mar 2007
    Location
    Sweden
    Posts
    4,179

    Default

    What do you mean it flips only once? I set an interval![/b]
    "interval" is not "set interval", it is merely a different version of schedule which makes sure that it is run at the specified rate (if rescheduled over and over again) and that it doesn't reschedule previous schedules, but wait for them to finish.

    Basically, interval remembers the exact time the last pulse should've occured and uses that as an offset for next pulse, instead of the current time, this allows you to do interval(20) and be sure that it actually runs 50 times per second and does not fall behind.

    Perhaps bad naming.

  3. #103
    Inactive Core Xii is on a distinguished road Core Xii's Avatar
    Join Date
    May 2007
    Location
    Finland
    Posts
    332

    Default

    Originally posted by documentation
    Instead of specifying a frequency, you schedule when the next clock pulse should occur using "schedule(50)", which will cause the next clock pulse to occur in 50 milliseconds. To continually keep it executing as it would with an external pulser use "interval(50)" instead and put it at the top of the expression, this function has basically the same functionality as schedule, however it does not override previously scheduled clock pulses, instead it just ignores the call.
    As far as the documentation is concerned, interval(1000) should keep triggering clk() every 1000 ms when you call the function.

    So the way I understood it,
    Code:
    schedule(ms)
    
    triggers clk() once in ms milliseconds, and
    Code:
    interval(ms)
    
    keeps triggering clk() in ms millisecond intervals.

    Did I miss something? You better rephrase how exactly interval() works.

    So actually, I'd just write it like this:
    Code:
    O@Out
    interval(1000)
    clk() -> Out = !Out;
    
    And according to your documentation, that should work.
    Grammar is the difference between [i]"helping your uncle, Jack, off his horse"[/i] and [i]"helping your uncle jack off his horse".[/i]

  4. #104
    Expressionism 2.0

    Syranide has disabled reputation Syranide's Avatar
    Join Date
    Mar 2007
    Location
    Sweden
    Posts
    4,179

    Default

    Yes it works like you wrote there
    But in your last example you put "first() -> interval(1000);", which would cause it to only execute once.
    I realize that it is a badly worded, but:

    "To continually keep it executing as it would with an external pulser use "interval(50)" instead and put it at the top of the expression."

    Just like you did now, I might rephrase is later today.

  5. #105
    Inactive CBBP is on a distinguished road CBBP's Avatar
    Join Date
    Apr 2007
    Posts
    207

    Default

    why thank you.

  6. #106
    Inactive Core Xii is on a distinguished road Core Xii's Avatar
    Join Date
    May 2007
    Location
    Finland
    Posts
    332

    Default

    The syntax is misleading - interval(ms) looks like a function.

    Something like...
    Code:
    N@Name
    I@Input
    O@Output
    interval@1000
    
    or something similar would make more sense.
    Grammar is the difference between [i]"helping your uncle, Jack, off his horse"[/i] and [i]"helping your uncle jack off his horse".[/i]

  7. #107
    Expressionism 2.0

    Syranide has disabled reputation Syranide's Avatar
    Join Date
    Mar 2007
    Location
    Sweden
    Posts
    4,179

    Default

    The syntax is misleading - interval(ms) looks like a function.

    Something like...
    Code:
    N@Name
    I@Input
    O@Output
    interval@1000
    
    or something similar would make more sense.[/b]
    Well, interval(ms) is a function, it schedules one clock pulse to happen soon™.
    interval@1000 would in my opinion add further confusion because you would then assume that it automatically schedules intervals (which is does not), and add the confusion of what is that, why does it look so funny. And I would not add new language constructs for something that really is a function.

    But I've been working alot with programming too so I guess we have somewhat different views.

  8. #108
    Inactive CBBP is on a distinguished road CBBP's Avatar
    Join Date
    Apr 2007
    Posts
    207

    Default

    Okay.. how wold one make an internal clock which

    counted up to X if A is true, else it counts down to 0.

  9. #109
    Inactive CBBP is on a distinguished road CBBP's Avatar
    Join Date
    Apr 2007
    Posts
    207

    Default

    oh yeah. Syn. SOmethign odd going on with the Mux Demux stuff. I had a script working fine and then added one more mux and demux into it and it stopped working right and just did stupid stuff like a never ending climbing number.

  10. #110
    Inactive Core Xii is on a distinguished road Core Xii's Avatar
    Join Date
    May 2007
    Location
    Finland
    Posts
    332

    Default

    Well, interval(ms) is a function[/b]
    What kind of a function is one you must put at the top?

    I mean, it would make sense if it was a function to initialize a system the other functions were dependent of, but it doesn't quite look like one to me.
    Grammar is the difference between [i]"helping your uncle, Jack, off his horse"[/i] and [i]"helping your uncle jack off his horse".[/i]

+ Reply to Thread
Page 11 of 40
FirstFirst ... 9 10 11 12 13 21 ... LastLast

Similar Threads

  1. Documentation of hi-speed devices
    By Black Phoenix in forum CPU & GPU Tutorials & Programs
    Replies: 91
    Last Post: 11-27-2009, 07:23 AM
  2. ZGPU Documentation
    By Black Phoenix in forum CPU & GPU Tutorials & Programs
    Replies: 21
    Last Post: 10-07-2009, 01:14 PM
  3. Documentation
    By Black Phoenix in forum CPU & GPU Tutorials & Programs
    Replies: 142
    Last Post: 08-31-2009, 11:40 AM
  4. Moongate Documentation
    By BlackNecro in forum Custom & Advanced Gates
    Replies: 24
    Last Post: 04-22-2009, 12:32 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts