Problem using '--' on a variable via a pointer

Hello.
I'm new to C (been learning just over a week now), so if you take the time to reply - please don't pitch the answer too high!
I've just finished work on my latest project - a Sudoku Solver. It only does simple puzzles, but it (finally) works.
Here's a basic run-down of what it does: a user enters the known numbers of a Sudoku grid, line by line, and the program assigns these to an array (if the number is unknown, the relevant part of the array is set to zero). The array also holds a 'possibles' value for each cell, which says how many numbers are still potential values for that cells (so, when the user's input is first translated into the array, this value will be nine for an empty cell).
A series of structs are then set up, one per cell, which hold various bits of information about each cell. The main things are the coordinates for each cell, together with whether each number (one to nine) is a possibility for that cell, and the total number of possibilities for that cell (which is a pointer to the 'possibles' value in the array, mentioned earlier).
The solving loop is split into two parts. The first goes through each struct, and determines whether the value for that cell is known or not. If it is, that value is removed as a possibility for each cell in its row, column, and box.
The second part of the loop goes through all cells and, if only one possibility exists for a cell, assigns that as the final answer in the array. The solving loop then continues until all cells are solved.
My problem came when reducing the 'possibles' value for a cell in the array, via the struct. My first attempt used this line:
*mySudoku[j].possibles--
('mySudoku' is the name of the struct type; 'j' is a value (0-81), and 'possibles' is a field that points to the value in the array that holds how many potential answers there still are for that cell). In my mind, that code snippet should point at the address held in that struct's field, and reduce it by one.
After much banging of head against a wall, I discovered that the above code snippet wasn't doing the same as:
*mySudoku[j].possibles = (*mySudoku[j].possibles)-1
Once I'd changed the code over, the program worked like a dream.
My question is: why aren't those two bits of code doing the same thing? I've obviously misunderstood something fairly basic, but I can't understand what.
If any of my explanation isn't clear, then please let me know and I'll clarify.
Thanks for your time,
Pete.
Message was edited by: Pete_M2

Pete_M2 wrote:
*mySudoku[j].possibles--
*mySudoku[j].possibles = (*mySudoku[j].possibles)-1
My question is: why aren't those two bits of code doing the same thing? I've obviously misunderstood something fairly basic, but I can't understand what.
In a word, precedence. The first operation performed is the array subscript. Then the member selection via ".". Next is postfix decrement. The pointer dereference is done last.
You should probably use parentheses to clearly specify the order in which you want operations to be performed. I am and have always been virtually clueless about precedence. I always use parentheses to clearly indicate what I want to be done. Even if they are redundant, they still help to clarify the situation.
I would have written the above code as:
--(*mySudoku[j].possibles)
I would use prefix decrement because I don't need the pre-decrement value. I use the parentheses for clarity even though they supposedly aren't needed with prefix decrement. I say "supposedly" because I really have no clue. I have been programming for 20 year and the only precedence I know is parenthesis trumps all (usually).

Similar Messages

  • Problem using a Boolean variable

    Greetings;
    I'm writing a game in which the player and 'enemies' fall off the screen when they 'die'. The problem is that I also want to constrain their  movement to within the screen boundaries whenever they have not been killed. To start  I thought I'd go into the class I wrote to handle the player falling off the screen when he's touched by an enemy and create a boolean variable so that Flash would know to let him fall off the screen when killed, but remain constrained on the screen until that point.The problem is that now the player stays on the screen even when I want him to fall off (i.e. after he's been hit).
    The class I wrote to handle the player dying is below, and the boolean variable is called 'playerBeenHit'. Since the player only gets a y acceleration when hit, I tried using the 'ay' variable to control the behavior but with the same results. In troubleshooting I tried to trace(playerBeenHit) on every frame and noticed it would go to 'true' and then set itself back to 'false' for three out of four readouts even after the player was hit. I'm not sure what I'm doing wrong here.
    Thanks,
    Jeremy
    package  jab.enemy
        import flash.display.MovieClip;
        import flash.events.Event;
        import flash.geom.ColorTransform;
        public class DieLikeAPlayer
            private var _clip1:MovieClip; // the 'player'
            private var _clip2:MovieClip; // the 'enemy' who kills the 'player' on contact.
            private var ay = 0; // vertical acceleration for falling off the screen.
            private var vx = 0; // horizontal initial velocity, 'knockback' from the impact.
            private var vy = 0; // vertical initial velocity, 'knockback' from the impact.
            private var playerBeenHit:Boolean = false;
            public function DieLikeAPlayer(clip1:MovieClip, clip2:MovieClip): void
                _clip1 = clip1;
                _clip2 = clip2;
                _clip1.stage.addEventListener(Event.ENTER_FRAME, onEnterFrame)
                function onEnterFrame(event:Event):void
                    if (_clip1.hitTestObject(_clip2)) // what happens when the player gets killed.
                        playerBeenHit= true;
                        ay = 3;
                        _clip1.scaleY = -Math.abs(_clip1.scaleY);
                        _clip1.alpha = 0.4;
                        _clip1.gotoAndStop(2);
                        vx = -0.2;
                        vy = 2;
                        _clip1.y += 5;
                        _clip1.rotation = -45
                    // adding y acceleration and x velocity (knockback) from being hit.
                    _clip1.x += vx;
                    _clip1.y += vy;
                    vy += ay;
                    if(playerBeenHit == false)//constrains the player from moving past the  bottom of the screen.
                         if(_clip1.y > 620)
                         {_clip1.y = 620;}
                    if (_clip1.y > 100000) // brings the player 'back to life' after falling 100,000 pixels.
                        ay = vx = vy = 0;
                        _clip1.alpha = 1;
                        _clip1.scaleY = Math.abs(_clip1.scaleY);
                        _clip1.rotation = 0;
                        _clip1.gotoAndStop(1);
                        _clip1.x = 480;
                        _clip1.y = 300;
                        playerBeenHit = 0;

    that shouldn't compile.  don't you see an error message about your boolean being assigned an int?  you are publishing for as3, correct?

  • Problem: Use an ODI variable in a Java Procedure

    Hi and thanks in advance,
    i need to use a project variable in a java procedure i've written. In particular i should read a file (and manage it...), but its name is stored in avariable called #fileName that i refresh each time.
    writing something like:
    <% FileInputStream fis = new FileInputStream(C:\\"+"#filename");
    etc.
    etc.
    %>
    doesn't work...
    How can i use the value of my ODI variable inside the Java code?
    Please, help me if you can...
    Thank you very much.

    Any Idea? Please, this question is blocking me...

  • Problem Using a Bind Variable on a SelectOneChoice List VO

    Hi everyone,
    I have a List View Object on my application that contains the lookup values for some combos. The underlying table has three columns: LOOKUP_TYPE, LOOKUP_CODE and DESCRIPTION. It is used like this: when i want to find out which are the possible values for the "Customer Status" field on a form, i need to execute this VO with LOOKUP_TYPE = "CUST_STATUS". when i want to find the Supplier status, i execute it with "SUPP_STATUS". Then i compare the value of LOOKUP_CODE with the customer_status or supplier_status codes to get its description.
    The problem is, i have to use this VO as the Dynamic List of values for a SelectOneChoice. I have correctly mapped it, but the VO query is like this:
    SELECT lookup_code, description FROM tab_lookup_codes WHERE lookup_type = :lkpType
    So i need to set the bind variable dinamically, as i would do with ExecuteWithParams, but for a SelectOneChoice list. How can i do such thing? is there a way to define a value for this parameter before ADF executes the List VO on the page definition, or even programatically?
    If you didn't understand my requirement, please let me know.
    Thank you very much for your time!
    Thiago Souza

    Hi Thiago,
    If i understand you problem you can try to insert a invokeAction to your page definition with refresh property equals prepareModel that call a method that sets your Where param propertly. In this way your method will be executed before prepareModel.
    I haven't test this, its only a possible idea.
    Best Regards
    Hi everyone,
    I have a List View Object on my application that
    contains the lookup values for some combos. The
    underlying table has three columns: LOOKUP_TYPE,
    LOOKUP_CODE and DESCRIPTION. It is used like this:
    when i want to find out which are the possible values
    for the "Customer Status" field on a form, i need to
    execute this VO with LOOKUP_TYPE = "CUST_STATUS".
    when i want to find the Supplier status, i execute it
    with "SUPP_STATUS". Then i compare the value of
    LOOKUP_CODE with the customer_status or
    supplier_status codes to get its description.
    The problem is, i have to use this VO as the Dynamic
    List of values for a SelectOneChoice. I have
    correctly mapped it, but the VO query is like this:
    SELECT lookup_code, description FROM tab_lookup_codes
    WHERE lookup_type = :lkpType
    So i need to set the bind variable dinamically, as i
    would do with ExecuteWithParams, but for a
    SelectOneChoice list. How can i do such thing? is
    there a way to define a value for this parameter
    before ADF executes the List VO on the page
    definition, or even programatically?
    If you didn't understand my requirement, please let
    me know.
    Thank you very much for your time!
    Thiago Souza

  • Problem Using Flash FLV Video Via Dreamweaver CS3

    I have been unable to get my FLV video to play on my website.
    I seem to have two problems:
    1) I want the FLV file to be hosted in a different domain to
    the website itself (for bandwidth reasons) and it doesn't want to
    do that!
    2) I would prefer to use Flash skins rather than Dreamweaver
    skins as I want to offer a full-screen option but I cannot get them
    to work!
    If I host the FLV file on the website domain, the video plays
    ok. If I change the file location in the Properties of the movie to
    become the FLV located on the other domain (using full path
    http://<etc>flv) then nothing
    displays on that part of the page. Firebug tells me it has loaded
    the AC_RunActiveContent.js and FLVPlayer_Progressive.swf but it
    makes no mention of the skin file or the flv file itself ... it is
    as if it just simply has not bothered with it! I suspect I am
    missing something obvious but cannot find it. All help would be
    appreciated. By the way, I have loaded up a crossdomain.xml file to
    the root of the domain that hosts the flv file but that didn't seem
    to make any difference!
    The second challenge is that ideally I would like to use a
    Flash skin so that I can have a full-screen option and so that I
    can have the menu bar under the video itself. However, I can't even
    get that option to work when I host the whole lot on the normal
    webserver! I am suspecting that it might be something that might
    suddenly start working when I fix problem 1. However, if anybody
    has any links to a page that provides simple instructions about how
    to do this task I would greatly appreciate it!
    Many thanks for your help!

    1) Why not post your video to YouTube or Google Video and
    then embed the
    code they provide into your website. This way their servers
    carry the
    bandwidth for you and the scripted embed code will work on
    your site.
    2) If Video sharing isn't an option, and you need more
    bandwidth, you can
    get domain hosting for as little as $4.95 - 6.95/month at
    Bluehost,
    Lunarpages or Web Hosting Pad.
    Nancy O.
    Alt-Web Design & Publishing
    www.alt-web.com

  • Problem using Express over Ethernet via Solwise Gigabit Homeplug

    I am hoping someone can help me here.
    Similar problem with Tandie (http://discussions.apple.com/thread.jspa?messageID=12175903&#12175903). I have a Vista PC which has no problem at all to connect to my Express over ethernet. I use my Express to "Create new wireless" network and stream my itunes over ethernet, which works well if I have a cable connected to the Express to my network where my Vista PC is connected.
    However, when I take my Express to another room and connect it to a Solwise Gigabit Homeplug and my other homeplug connects to my network I then seem to have problems. The homeplug works perfectly with my PS3, but my Express after about 2 hours itunes and Airport Utility is unable to find it. I can however ping the Express, but that is it.
    Here's how I configured the AX:
    Wireless Mode = Create a wireless network
    Wireless Network Name = unique name different to my Wireless BT Hub
    Radio Mode = 802.11n (802.11b/g compatible)
    Channel = Automatic
    Click the Internet icon
    Connect Using = Ethernet
    Connection Sharing = Share a public IP address
    AX Firmware ver: 7.4.2
    Message was edited by: Charles266

    Welcome to the discussions, Charles266!
    However, when I take my Express to another room and connect it to a Solwise Gigabit Homeplug and my other homeplug connects to my network I then seem to have problems.
    Connection Sharing = Share a public IP address
    This would be the correct setting if your AirPort Express is connected directly to a simple modem (a simple modem has only 1 ethernet port)
    If you have the Express connected back to another router (it will have 3-4 ethernet ports), then the correct setting for Connection Sharing would be "Off (Bridge Mode)"
    I can't say if this will solve your problem. If you continue to have issues, then test using an ethernet cable from the Express back to your main router. If this works well, then one or both of the powerline products is suspect.

  • Problem using N.A.S. (via smb) after update SL 10.6.6 (folder settings)

    Hi everybody,
    after updating my system, Finder doesn't seem to remind my settings on a smb:// folder, in particular text size is always 0, icons are too small and so on... Even if I put back settings in the right way, next time I see all wrong once again. Of course when I was on SL 10.6.5 I didn't experience nothing bad at all.
    Somebody had similar issues? Thanks.

    Hi,
    I have noticed the error occurs when I copy files from my Mac to any samba server (I run OpenSuSE on a Phenom-X4 and Ubuntu PPC on an old iBook-G3). However when I copy to a file share on a PC running Windows Server 2003 I do not get any file copy problems.
    Reading and executing files from mounted samba shares or windows shares did not seem to have any issues.
    For the moment I have relegated myself to copying files to a Windows OS running on a virtual machine in my Phenom-X4 and then logging into the VM and copying the files a second time to the samba share but I would appreciate anyone posting further on this issue. Because of my experiences I believe the issue is an incompatibility with the Samba servers after upgrading to 10.6.3.

  • Several Problems using email

    OK, I have problems using the email both via the web and via my email client software.
    iMac running Mac OS 10.7.5; Firefox web browser, Thunderbird email client.
    First the web problems. I can save a draft message, but when I return to finish and send it, I can't either edit the draft nor send the draft. If I highlight a word in the draft and try to delete it, the entire draft is moved to the trash.
    Now the email client software problems. I've set the client up using the server settings from Apple's KB article iCloud: Mail server settings for email clients However, iCloud rejects them as being invalid plus I'm told my password is wrong (the same password that works fine logging in via a web browser). Additionally, the Apple KB article says to use iCloud Preferences in Mac OS 10.7.4 and later but there isn't any place there that addresses the server settings.
    Any help will be appreciated.

    In Mail's Accounts/Mailbox Behaviors preference pane check to see how you have Sent configured.  Maybe change it, reboot and then change back to what you currently have.

  • Using network shared variables in two computers connected via a network switch

    let me start by saying im a rookie to the programming environment but i have used Labview a couple of times to understand the basics,  i have a computer and a laptop (both using vista), both of them with Labview Full development System (Student ed. with Mathscript) installed, so what im tryin to do is to use the built in microphone located in the laptop to aquire sound and then use a Shared Variable to transfere the sound signal from the laptop to the computer, the laptop and the computer are connected to a network via a network switch and ethernet cables,  so far i nothing worked, i can manage to create the shared variable in the laptop and use it there but it doesnt appear in the computer, im not sure whats the problem i have even disabled firewalls in both systems, help from anyone wil be appreciated.....

    Hi Lukie,
    This KB should be of some assistance to you.
    Trouble shooting network published shared variables
    Also the following link gives some instructions on the use of shared variables.
    http://zone.ni.com/reference/en-XX/help/371361B-01/lvhowto/bind_to_source/
    I hope this is of some assistance, let me know if you have any more problems.
    All the best,
    Message Edited by mickeyw on 08-05-2008 12:29 PM
    Mike W
    Applications Engineer
    National Instruments UK&Ireland

  • Double Role for Analysis Authorization using Variable via Customer Exit

    Hi Guys I have been implementing AA using variable via customer exit and I have run into this problem, I wonder anyone have encountered this.
    Example I have a User having 2 sets of authorization Roles
    Role 1
    Personnel Area = A, B
    Personnel Sub Area = 1,
    Role 2
    Personnel Area = A
    Personnel Sub Area = 1, 2
    And what we can derive this that is the user is able to see A-1 B-1 and A-2 BUT NOT B-2 when we run all.
    But instate when we run the report it is drawing B-2 as well as because we are entering
    Personnel Area = A,B
    Personnel Sub area = 1,2
    Any idea how to solve this?
    <removed by moderator>
    Edited by: Siegfried Szameitat on Dec 3, 2008 2:41 PM

    Hello Chee Jason,
    Are you working with version 3.5 or 7.0
    How do you specify Hierarchy variable?
    Any advise you can share is very much appreciated.
    Thanks,
    Patrick

  • Hierarchy Authorization using Variable via Customer Exit

    Hi experts,
    I am wondering if I can do Hierarchy Authorization using Variable via Customer Exit? I know it can be done on normal value authorization by putting $+(the variable name). So can we do the same for Hierarchy authorization?
    For my case I have a 0ORGUNIT and I would allow the role to access anything below its node. So do I put $VARORGUNIT in Technical Node Name and Hierarchy name as ORGEH, Type of authorization = 1 and Area of Validity = 3.
    Points will be given!
    Thanx!

    Hello Chee Jason,
    Are you working with version 3.5 or 7.0
    How do you specify Hierarchy variable?
    Any advise you can share is very much appreciated.
    Thanks,
    Patrick

  • Problem using local variable in event loop

    I have a state machine from which I want to monitor various controls, including "Start" and "Stop" buttons.  Not every state needs to monitor the controls.  At present, most states run timed loops.  In the first state that reads the front panel, I have an Event structure (inside a While loop) that monitors the various controls' Change Value events.  For numeric controls, I update variables (in shift registers) as needed.  The "Start" button is used to end the While loop controlling the Event structure, allowing the State to exit to the next state.
    My problem comes in subsequent states that employ this same idea.  Here, I put a Local Variable bound to the Start button and use the same code, but it frequently happens that when I enter this particular state, I cannot "turn on" the control -- I push the button, but it stays off.  Curiously, if it was On when I enter, I can turn it off, but then I'm stuck not being able to turn it on.
    I mocked up a very simply routine that illustrates this.  There are two sequences (corresponding to the two states).  Both use an Event loop with a local variable bound to my Stop button (really this is an LED control with custom colors).  I've deliberately moved the "initialization" (the declaration of the control in the block diagram) out of the Event loops -- putting it inside the first loop modifies the behavior in another strange way.
    Here's my thinking on how I would expect this to work:  The code outside Event Loop 1 should have little effect.  Assume the Stop button is initially Off.  You will "sit" in Event Loop 1 until you push the Stop button, changing its value to True; this value will be passed out of the Event case and cause the first While loop to exit.  You now enter the second sequence.  As I understand the Exit tunnel, it defaults to "False", so I'd expect to stay in the second Event loop until I turn the Stop button from On to Off, which will pass out a False, and keep me in the While for one more button push.  However, this doesn't happen -- I immediately exit, as though the "True" value of the Stop local variable is being seen and recognized by the Event loop (even though it hasn't changed, at least not in the context of this second loop).
    An even more curious thing occurs if I start this routine with the Stop button turned on.  Now I start in my Event loop waiting for a change, but this time the change will be from On to Off, which won't cause an exit from the frame.  This will be reflected by having the While loop count increment.  We should now be in the state of the example above, i.e. in an Event loop waiting for the control to be pushed again, and turned On.  However, clicking the control has no effect -- I cannot get it to "turn on".
    Where am I going astray in my thinking?  What is it about this method of doing things that violates the Labview paradigm?  As far as I can tell, what I'm doing is "legal", and I don't see the flaw in my reasoning, above (of course not -- otherwise I'd have fixed it myself!).  Note that because I'm using local variables inside Event loops (and I'm doing this because there are two places in my code where I want to do such testing), the Stop control is not latching (as required).  Is there something that gets triggered/set when one reads a latched control?  Do I need to do this "manually" using my local variable?
    I'll try to attach the simple VI that illustrates this behavior.
    Bob Schor
    Attachments:
    Simple Stop Conundrum.vi ‏14 KB

    altenbach wrote:
    Ravens Fan wrote:
    NEVER have multiple event structures that share the same events. 
    Actually, that's OK.  NOT OK is having multiple event structures in the same sequence structure.
    See also: http://forums.ni.com/ni/board/message?board.id=170&message.id=278981#M278981
    That's interesting.  I had always thought I read more messages discouraging such a thing rather than saying it was okay.  Your link lead me to another thread with this message. http://forums.ni.com/ni/board/message?board.id=170&message.id=245793#M245793.  Now that thread was mainly concentrating on registered user events which would be a different, but related animal. 
    So if you have 2 event structures they each have their own event queue?  So if you have a common event, one structure pulls it off its event queue and it does not affect the other structure's event queue?  I guess the inherent problem with this particular VI was that the second event structure locked the front panel.  Since the code never got to that 2nd event structure because the  first loop never stopped because the change was from true to false.  After reading your post and the others, I did some experimentation and turned off the Lock front panel on the 2nd structure, and that prevented the lockup of the program.
    Overall, the example VI still shows problems with the architecture and I think your answer should put the original poster on the right track.  I think as a rule I would probably never put the same event in multiple structures, I feel there are better ways to communicate the same event between different parts of a program,  but I learned something by reading your reply and about how the event structures work in the background.  Thanks.

  • Process Integrator Problem (use of session bean variable between tasks)

    Hello,
    I'm having a problem using the Process Integrator. I made a
    really simple workflow (Start, Task1, Task2, Done) which uses
    the bean given whith the order processing example. Task1 creates
    the bean and executes a business operation (check inventory).
    Task2 executes another business operation (calculate total
    price). The problem is when I try to execute this second b.o I
    get an exception saying
    Nested exception is: Workflow error:
    com.bea.wlpi.common.WorkflowException: Empty instance object for
    business operation "Calculate Total Price" in
    template "Template3".
    Someone could help me and tell me what I am doing wrong.
    Thanks in advance,
    Albert

    If I understand you correctly, you have 3 business operations, one is "Create a EJB",
    one is call "Check Inventory", the other is "Caculate Total Price". I assume you
    save the EJB handle to a workflow variable with a type Bean. My speculation is when
    you define business operation for "Calculate Total Price", you did not associate
    it with the workflow variable that you saved the EJB handle. Just a wild guess.
    Jim Zhou.
    "Albert Lanchas" <[email protected]> wrote:
    >
    Hello,
    I'm having a problem using the Process Integrator. I made a
    really simple workflow (Start, Task1, Task2, Done) which uses
    the bean given whith the order processing example. Task1 creates
    the bean and executes a business operation (check inventory).
    Task2 executes another business operation (calculate total
    price). The problem is when I try to execute this second b.o I
    get an exception saying
    Nested exception is: Workflow error:
    com.bea.wlpi.common.WorkflowException: Empty instance object for
    business operation "Calculate Total Price" in
    template "Template3".
    Someone could help me and tell me what I am doing wrong.
    Thanks in advance,
    Albert

  • Problem using variables

    Hi,
    I'm having problems using different variables in captivate 4.
    I'm developing a courseware in Hebrew and I know there is a problem inputing hebrew strings into variables in captivate since there is no middle eastern version to the software, but I also having problems displaying system variables such as current date etc', and even inputting numbers into user variable.
    Would appreciate your help,
    Oren.

    Have you tried downloading and installing the Captivate 5.5 trial version and testing it with these Hebrew characters and variable issues?
    I know that Cp 5 and 5.5 have some support for double-byte Asian characters, so maybe they also have better support for Hebrew.
    Also, when you add a variable string using the $$ characters on each end, make sure there's a space between before the first $$ characters and after the final $$ characters enclosing the variable string.

  • Problems using a variable with a tag of a webapp

    I have a webapp where I've built a field in the database for the item is active or not, depending if my client chooses if it's free or not.
    The name of the tag that I want to use as a variable is { tag_estado } and has two values:
    Gratis
    Pago
    When in jQuery I create a variable to store the value of this tag and created a conditional to activate the link and icon of the item, always the tag value prints it on "Pago", even though the webapp item has the value of "Gratis"
    I appreciate your time to help me resolve this issue.
    <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
              var linkleccionGratis = function() {
                        $(".linkLeccion").attr('href', '{tag_itemurl_withhost}?tab=video');
              var linkleccionPago = function() {
                        $(".linkLeccion").attr('href', '#dataaaaaaaa');
              var imagenGratis = function() {
                        $('.videoIcono').each(function(){
                              //Change the src of each img
                              $(this).attr('src', '/Comportamiento-Video/Iconos/1365805563_movie_studio-android-r_1.png');
              var imagenPago = function() {
                        $('.videoIcono').each(function(){
                              //Change the src of each img
                              $(this).attr('src', '/Comportamiento-Video/Iconos/1365805563_movie_studio-android-r_0.png');
        var EstadoLeccion = "{tag_estado}";
              if(EstadoLeccion == "Pago"){
                                  linkleccionPago();
                                  imagenPago();
              else if(EstadoLeccion == "Gratis"){
                                  linkleccionGratis();
                                  imagenGratis();
                        else{
                                  linkleccionPago();
    </script>
    <div style="width: 921px; margin-bottom: 10px;">
    <div class="FranjaSuperiorTituloLeccion">
    <div class="TituloContenedorLeccionWebApp">
    <div class="TituloLeccionWebApp">Lecci&oacute;n {tag_num_leccion}: {tag_titulo_leccion}</div> </div> <div class="ImagenesBotonesLeccionWebApp">
    <a class="linkLeccion" href="#data" id="inline"><img alt="Video" class="videoIcono" src="http://www.excelvirtual.org/Comportamiento-Video/Iconos/1365805563_movie_studio-android-r_ 0.png" style="margin-top: 6px; width: 31px; height: 31px;" />
    </a>
    </div>
    <div class="ImagenesBotonesLeccionWebApp">{tag_actividad url}</div>
    <div class="ImagenesBotonesLeccionWebApp">
    <a href="{tag_cuestionario}" target="_blank">
    <img alt="Cuestionario" src="http://www.excelvirtual.org/nuevodiseno/images/actividaddef2.png" style="width: 41px; height: 41px;" />
    </a>
    </div>
    </div>
    </div>

    It's tough to tell without seeing the page but it looks like your code may be defaulting to the else statement. You could delete the else and see if it does anything

Maybe you are looking for

  • Installing HP Officejet Pro 8000 Wireless problems

    I'm having a problem installing my printer.  When I first installed it I could use it as a local printer (usb wired to my computer) and it printed fine.  I have a laptop and purposely bought the wireless printer so that I could use it with the laptop

  • Acrobat XI Pro (Mac) not recognize scanner

    Hello, With Maverick 10.9.3 the v11.0.0 no longer recognizes my HP Scanjet 5590 ... The acrobat list "Select a device" is always empty ! I uninstall Acrobat and HP driver then perform a new installation, the problem is same ... The scanner is properl

  • Connect Operation Failed

    Good morning. I had created a form designed via LiveCycle, it was connected to a database. The location of our database was recently moved from one drive to another and while I re-pointed the form to this location and tested my connection with succes

  • Turn off screen?

    When using an external monitor, is there a way to turn off the laptops screen easily? Basically I want to hook up to my LCD TV via DVI and when connected I want my laptop screen to be off as I just use the TV. Now on some Dell's (yuk) you can press t

  • How to clear the custom tags in the phonebook?

    some time create a label on the agenda of the phone contacts, your name is "profile", but now I want to delete because it is no longer useful, but not how to delete this custom tag. I want to know how can i delete this custom tag?