Continuation character in C program not working

Hi,
I have just installed Studio 10, upgrading from Workshop 3, and some of my code is not compiling. One of the things that it is complaining about is the use of the backslash character to continue lines.
For example
fprintf (LogFileHandle, "01 Processed\n\
------------\n\
Crystal Records %d\n\
Arbor Records %d\n\
SSBS Records %d\n\
Total %d\n\n\
02 Processed\n\
------------\n\
Crystal Records %d\n\
Arbor Records %d\n\
SSBS Records %d\n\
Total %d\n\n\
02 Written Out\n\
-----------\n\
Crystal Records %d\n\
Arbor Records %d\n\
SSBS Records %d\n\
Total %d\n\n\
02 Ignored (Not Live)\n\
--------------------\n\
Crystal Records %d\n\
Arbor Records %d\n\
SSBS Records %d\n\
Total %d\n\n\
02 Rejected (Duplicates)\n\
------------------------\n\
Crystal Records %d\n\
Arbor Records %d\n\
SSBS Records %d\n\
Total %d\n\n\
%24.24s Exited successfully\n",
<various parameters corresponding to above list>....;
All the backslash characters above it complains about. Is there an option to turn this off or are you really not allowed to break up lines anymore?
Thanks

Are you sure your source code is not DOS text? (i.e. containing ^M).
I'm able to compile the string you have shown above without any compiler messages.
And answering your question - as per any C standard supported by SS10 (C99, C89) you are able to break lines by backslashes.
It is a basic compiler functionality and should work right away.
regards,
F.

Similar Messages

  • 'Program not working' - panorama

    When I attempt to create a panorama using Photoshop Elements 9 on my recently purchased Windows 8.1 pc I get a message saying 'Program not Working' and I have to close the editor. This function was ok on my old Windows XP pc. Can anyone help?

    First, quit the editor, then restart it while holding down ctrl+alt+shift. Keep the keys down till you see a window asking if you want to delete the settings file. You do. Note that if you have set the welcome screen to automatically open the editor, it won't work from that shortcut. Use the actual .exe/application file or the buttons in the organizer or on the welcome screen.

  • Issue with Apple Camera VendorID_0x106B ProductID_0x1570 green light blinks continually...camera does not work in photo booth or face time

    Green light blinks continually...camera does not work in photo booth or face time.Any suggestions?

    Hi Rogerya,
    Thanks for using the Apple Support Communities. It sounds like you may be experiencing issues with the built-in FaceTime camera (also known as iSight) on your MacBook Air. The following resource provides relevant troubleshooting information that you can try:
    How to Troubleshoot iSight - Apple Support
    https://support.apple.com/en-us/HT2090
    Important: Follow these instructions in order. Test the camera between steps to see if the issue is resolved.
    Built-in iSight cameras
    These steps are for iSight cameras that are built into a computer, such as the iMac G5 (iSight) or later, the MacBook, or MacBook Pro.
    1. See if the issue is application-specific.
    Try another application (iSight works with applications like iChat, PhotoBooth, and iMovie HD 6) to see if the iSight camera exhibits the same behavior in all applications. If it only happens in one application, try reinstalling that application.
    2. See if the issue is user-specific.
    Test your iSight camera in another user account. If the issue only occurs in one user, the issue would be isolated to user settings.
    3. Find out if the computer recognizes the iSight
    Check System Profiler (in the Utilities folder, inside the Applications folder). Under the USB header, check to see if the iSight camera is detected.
    4. Reset SMC or PMU
    Reset your computer's SMC or PMU, and then check System Profiler again. (SMC reset instructions for iMac G5 (iSight), Intel-based iMacs; PMU reset instructions for MacBook and MacBook Pro.)
    If your built-in iSight camera is still not behaving correctly after trying all these steps, you may need to contact Apple or an Apple-Authorized Service Provider for service.
    - Matt M.

  • My adobe is not working with Windows 7 it says "program not working"

    My adobe does not worked with I have tried 9 & 10 both versions. It does not seem to work with Windows 7.

    Adobe Reader X works very well on Windows 7.
    Please give us the exact error message you're getting; "program not working" is not a message that Windows or Adobe Reader would issue.

  • My MacBookPro is continuously buzzing, the backlights are not working although it should be on. Tried to cover the sensor, but it's not that. Also, it's telling me that I have no batteries and the charging is not working either.... Any help? PLEASE!!!!

    My MacBookPro is continuously buzzing, the backlights are not working although it should be on. Tried to cover the sensor, but it's not that. Also, it's telling me that I have no batteries and the charging is not working either.... Any help? PLEASE!!!!

    Intel-based Macs: Resetting the System Management Controller (SMC)

  • Successmaker program not working behind Cisco SA520

    My customer is a small school in British Columbia. They have used the Successmaker program (written by Pearson Education) to teach numeracy and literacy skills. Since installing a SA520 the teachers are saying that Successmaker does not work properly.
    I am at my wits end.
    I have disabled content filtering for the SA520, I have disabled IDS on the SA520. I am using the default outbound firewall rule allowing inside addresses access anywhere on the Internet, and I have created an inbound firewall rule allowing all traffic and all services from the Successmaker server IP address that their tech support gave us.Their app is still unable to work properly.
    What am I missing?
    Before the SA520 was installed the school was using PAT to map different ports on the public IP on the school cable modem to inside addresses. The whole school was a big DMZ, and any port scanning would have reached into their network. The port mappings were never communicated to the Successmaker folks, so I doubt they were ever relevant to the issue. The Successmaker App is web based, and according to their tech support uses "transfer encoding:chunked" technology. I read up on this and it dates back pre Web 2.0 (pre flash, pre silverlight, pre basically the silicon chip). It is discussed in RFC 2616, the SA520 is Linux based, not IOS based. Does that mean that it does not understand RFC2616? I doubt it, and even if it didn't understand RFC 2616 surely all the steps I have taken above would blow a hole the size of a barn door through the firewall?
    If this weren't a school would not be as emotionally connected as I am to their situation. Without this firewall they will be without much protection at all.
    Can you help?
    Message was edited by: dirkventer - I added the feedback received from Successmaker tech support. It suggests that the Cisco SA520 may be a problem, something I don't want to believe.

    Hi Quendale
    I'm sorry to say that putting a student computer in the DMZ didn't resolve the issue.
    In setting up the DMZ I made the following changes -
    1) I confirmed that the Option interface was in DMZ mode, and that it had a static IP on a new subnet.
    2) We also configured the DMZ DHCP to assign addresses in the subnet, using the firewall DMZ IP as default gateway, and using the firewall DMZ IP as DNS server.
    3) I created a default firewall rule allowing all outbound traffic from the DMZ to the Internet, and created a firewall rule allowing all inbound traffic from the Successmaker server on the Internet (insecure) zone to the DMZ.
    4) I confirmed that IPS was off for the DMZ (Default) and that the content filter exception for the DMZ was still disabled.
    The same problem occurred, which makes me believe that the reason for the application not working in the LAN zone had nothing to do with IPS or content filtering. As far as the firewall rule goes, the impact of the inbound rule seems to have been the same - i.e. ineffectual.
    Connecting the PC running successmaker directly to the school cable modem works.
    The possibility that the application in question has traffic blocked because of a RFC (2616?)  governing the way get and post requests should be formatted would still exist so long as integrity/compliance checking of packets is something that cannot be bypassed via the firewall configuration. Suffice it to say that the application appears dated and uses nothing of web 2.0. One of the options available to my customer is the purchase of the Web 2.0 version of successmaker ($600/seat), but they are only prepared to explore this option if the indications are that the older application, not the firewall is at fault. Pearson Education support swears blindly that thousands of BC school children continue to use the old app behind Cisco firewalls. I don't deny that the possibility exists that the Pearson support technician is stretching the truth, having an older application that has ceased to function with more sophisticated firewalls because RFC violations in packet formatting have become significant would doubtless present a solid easy-sell for their upgraded version, which is expensive, especially for a school.

  • PL/SQL program not working when connect database via SqlNet

    Hi,
    This is a segment of a PL/SQL program before opening a cursor using input descriptor. It is working fine ( to get the value of unOutputCount ) without connect to a database via SqlNet, can anyone tell me why it is not working ( unOutputCount return 0)while connecting to a database via SqlNet and how to make it work without opening a cursor before DESCRIBE OUTPUT ...?
    EXEC SQL ALLOCATE DESCRIPTOR GLOBAL 'input_111'
    WITH MAX 100;
    EXEC SQL ALLOCATE DESCRIPTOR GLOBAL 'output_111'
    WITH MAX 100;
    EXEC SQL PREPARE STMT1 FROM :psSqlStatement;
    EXEC SQL DECLARE CURSOR1 CURSOR FOR STMT1;
    EXEC SQL DESCRIBE INPUT STMT1
    USING DESCRIPTOR GLOBAL 'input_111';
    /* Get count of input parameters in statement */
    EXEC SQL GET DESCRIPTOR GLOBAL 'input_111' :unInputCount = COUNT;
    EXEC SQL DESCRIBE OUTPUT STMT1
    USING DESCRIPTOR GLOBAL 'output_111';
    /* Get count of output parameters in statement */
    EXEC SQL GET DESCRIPTOR GLOBAL 'output_111'
    :unOutputCount = COUNT;

    Hi,
    Welcome to Oracle OTN Forums!
    I changed your code a little. I think this help you
    CREATE OR REPLACE
    PROCEDURE xx_test
    IS
      v_pid VARCHAR2(100);
      v_cn  VARCHAR2(100);
      v_id  VARCHAR2(1000);
      v_val VARCHAR2(1000);
      CURSOR C1
      IS
        (SELECT product_id, 'PRODUCT_ID'  cn
            FROM product1 );
      BEGIN
        FOR V1 IN C1
        LOOP
          FETCH C1 INTO v_pid, v_cn;
          dbms_output.put_line('==== '||v_pid||'==== '||v_cn);
          EXECUTE IMMEDIATE
          'SELECT product_id, DECODE(COUNT (product_id),1,MAX (product_id))||'''||V_CN||''' as val
            FROM product1
           WHERE product_id =:a
           GROUP BY product_id)' INTO v_id, v_val USING v_pid;
          dbms_output.put_line('==== '||v_id||'==== '||v_val);
          EXECUTE IMMEDIATE 'UPDATE product2 SET '||v_cn||' = ' ||''''|| v_val ||''''|| ' WHERE product_id = :b' USING v_pid;
          dbms_output.put_line('++++ '||v_cn||'++++ '||v_val||'++++ '||v_pid);
        END LOOP;
      END xx_test;

  • Mail program not working since upgrading to Leopard 10.5.6

    We have loaded the new Leopard system now twice, and both times the Mail program fails to launch from the taskbar, but stays open in the background. The program will not close, and fails to open to even try to check email. It seems other programs are working just fine, but nothing right with Mail. Anyone know if there is a fix to this?
    Thanks,
    lldowney

    Hello, and welcome to the Discussions.
    While the other poster's cited article references certain issues with 10.5.6, they are when updating a system that was already on Leopard. If, as it appears, you were Upgrading an earlier version of OSX, such as 10.4.11, then the relevant article is:
    http://support.apple.com/kb/TS2537
    Where an even earlier OSX than Tiger once generated the Mail folder, two other MessageSorting files will need to be removed, also.
    Ernie

  • Java program not working using newer version of scheduler (AutoSys)

    A little background: I'm in the middle of trying to upgrade our AutoSys server (scheduler) to the latest version (version R4 to R11) and have to do regression testing to ensure our jobs will work in the new version. There's a small java program that is not working supposedly due to the following error:
    Exception in thread "Main Thread" java.lang.NoClassDefFoundError: com/f1j/swing/common/JDKAdapter
    at com.f1j.swing.common.Adapter.<clinit>(Adapter.java:86)
    at com.f1j.swing.engine.ss.JBook.<init>(JBook.java:3032)
    at com.f1j.swing.engine.ss.JBook.<init>(JBook.java:3096)
    at com.test.Foo.performScan(Foo.java:122)
    So in the old version (R4), it runs fine. In R11, I get the exception above. The CLASSPATH matches and I've verified that by echoing it in the shell script that calls the java program. Here's how it's called in the shell script.
    echo $CLASSPATH
    ${JAVA_HOME}/bin/java com.test.Foo
    So the Foo class was written by me, which makes use of this external library called f1j11swing.jar (for spreadsheet creation).
    The source of the error is from this line in Foo (line 122):
              book = new com.f1j.swing.engine.ss.JBook();
    The funny part is JDKAdapter (the missing class) is in the same jar file as JBook, so it definitely finds the library in the classpath. But for some reason, this new AutoSys version is spitting out this error. I've exhausted many approaches to resolving this, but I'm still stuck.
    Here's the layout of how things are called (should be same for R4 and R11):
    1. AutoSys server logs into client machine XYZ as user arnold
    2. arnold (AutoSys client) on XYZ executes shell script to call java program
    The only significant difference I see is that the AutoSys server in R4 is HP while the R11 server is Sun. However, it shouldn't matter because the client server they're logging into to execute the script is the same linux server.
    Does anyone have any ideas? I've already started dialogue with the vendor and it seems kind of in limbo at the moment. Please let me know if you need more info. Thanks.

    Hi DrClap,
    I just checked jre/lib/ext of my $JAVA_HOME and verified that there doesn't exist any library with a class named "Adapter." We don't put anything in this directory other than what came with the original installation. I've tried isolating the jars before as well, by doing something like (to no avail):
    java -cp /users/test/lib/f1j11swing.jar:/users/test/lib/Foo.jar com.test.Foo
    If I remove the f1jswing11.jar path in the above command, it will complain about other things. Also, for fun, I tried dropping f1j11swing.jar into the ext folder and removing it from the CLASSPATH and it yielded the original error. Running it directly from the shell and old version of autosys works fine.
    I hope I understood your suggestion correctly and please let me know if you have any other ideas. I'm surprised why java would act differently with a different version of an AutoSys client logging into the same machine and environment. Thanks.
    xiarce - I haven't heard anything regarding this, but I'll bring it up. Thanks.
    Edited by: user4170063 on Apr 13, 2011 2:25 PM

  • Program not working ib background

    Moderator message: background/foreground/GUI problems = FAQ, please search before posting.
    Hi All,
    I have a program which is not working in background.It actuly takes the file and using GUI_upload i upload it into ITAb and then modify the database table based on this. But when i process this in foreground it working and updating the table.But when i scedule in background the job is getting over in 1-2 sec and not updating the table.
    Please help me. below is the code for your refrence:
    data:begin of i_tab occurs 0,
          Bp1 like DATAbase table,
          Bp2 like  database table,
         trf1 type string,
         trf2 type string,
         status type string,
      end of i_tab.
    data: BP_ver type STANDARD TABLE OF DATAbase table      with header line ,
          w_ver type  ZVERS_BUT050_CUR .
    DATA: it_tab type filetable,
        gd_subrc TYPE i,
        file_name TYPE string,
        path TYPE string.
    DATA : lw_file TYPE file_table.
    DATA: LIN TYPE I.
    *Input File
    SELECTION-SCREEN begin of block blk with frame title text-100.
    SELECTION-SCREEN SKIP 2.
    parameters : p_file like rlgrap-filename .
    SELECTION-SCREEN end of block blk.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CLEAR:  file_name.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          window_title     = 'Select only Text File'
          default_filename = '*.txt'
          multiselection   = ' '
        CHANGING
          file_table       = it_tab
          rc               = gd_subrc.
      READ TABLE  it_tab INTO lw_file INDEX 1.
      file_name = lw_file.
      p_file = file_name.
    START-OF-SELECTION.
    *Upload the file
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                      = FILE_NAME
         FILETYPE                      = 'ASC'
       HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
        TABLES
          DATA_TAB                    = i_tab
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      loop at i_tab.
        if i_tab-status = 'Yes'.
          i_tab-status = 'V'.
        else.
          i_tab-status = 'I'.
        endif.
        modify i_tab.
      endloop.
      if i_tab is not INITIAL.
        select * from DATAbase table into CORRESPONDING FIELDS OF TABLE  BP_ver FOR ALL ENTRIES IN i_tab
          where PARTNER1 = i_tab-Bp1 and PARTNER2 = i_tab-bp2  .
      endif.
    *Update the table
      loop at BP_ver .
        clear i_tab.
        read TABLE i_tab  with key bp1 = BP_ver-PARTNER1 bp2 = BP_ver-PARTNER2  .
       if i_tab-bp1 = w_ver-PARTNER1 and i_tab-bp2 = w_ver-PARTNER2.
        BP_ver-PARTNER1 = i_tab-bp1 .
        BP_ver-PARTNER2 = i_tab-bp2 .
        BP_ver-Z_CURRENTLY_VALI = i_tab-status .
        modify BP_ver TRANSPORTING Z_CURRENTLY_VALI .
       endif.
      endloop.
      update DATAbase table from table bp_ver[] .
      if sy-SUBRC eq 0.
        commit work.
        message 'Table DATAbase table Updated Sucsussfully' type 'S'.
      else.
        message 'Table Not Updated !!! Check the file data or input' type 'S'.
      endif.
    Edited by: Thomas Zloch on Nov 12, 2010 11:03 AM

    Hi,
         Look at the coding in FM GUI_UPLOAD ... This does not work in background ....
    Batch mode is not supported
      IF sy-batch = 'X'.
        MESSAGE ID 'FES' TYPE 'E' NUMBER '002' RAISING NO_BATCH.
      ENDIF.
    Regards,
    Srini.

  • Dock not working; command-tab switch between programs not working

    The Dock does not work. I have restarted (although the computer will not restart under "Restart", getting stuck at the last part, and needs to be restarted manually). When I change Dock preferences it reverts back to default settings. If I am lucky, the dock will appear and then disappear (poof) without having functioned.
    The command tab function for switching between programs stopped working also.
    The individual programs work, but I have to go to recent items to switch programs.
    Further, I have two Previews open (with different documents in each) even though I have only one Preview program.
    A whole lot of bizarre things that may be connected? I would appreciate any help.

    You could try removing the .plist file again, but this time, try also removing the com.apple.dock.db file. Then log out and log in again.
    Also, it seems as if many people are having similar problems. See [this thread|http://discussions.apple.com/thread.jspa?messageID=9126119].
    So, does the problem persist with another user account?
    If it were my machine, the next thing I'd try is downloading the combo updater from Apple's website and reinstalling it. 10.5.6 is available [here|http://support.apple.com/downloads/MacOS_X_10-5-6_ComboUpdate].

  • Programs not working

    So, I just got back from my college's spring break and updated my computer over the break with the latest software update and since then, numerous programs, to include skype, pages, numbers are not working at all and even system preferences freezes up. I've re-installed skype and restarted my computer several times to no avail. I'd prefer to not reinstall the OS (seeing as it's more than just iWork that's not working) or anything else since I have been unable to backup my files in a very long time. Any assistance would be greatly appreciated.

    The updates may just be a coincidence. Back up your hard drive and prepare for a possible hard drive failure. Boot to the Lion recovery disk and run Repair Disk from Disk Utility.

  • Keystroke return and ASCII character 13 and 10 not working in

    I have the following script to opens a web page of my internal telephone switch (all in the local network) and fill in the two fields that come up and needs filled out in order to log in.
    tell application "Safari"
    activate
    open location "http://192.168.1.90/"
    end tell
    tell application "System Events"
    delay 1
    keystroke tab
    delay 1
    keystroke "" -- Note: Username goes here if one is wanted/needed
    delay 1
    keystroke "XYZ" -- Note: Password goes here if one is wanted/needed
    delay 1
    keystroke (ASCII character 13)
    end tell
    All works fine, it skips the first field (the login name is blank). Puts the password in the next field. However it refuses to activate the “log-in” button of the login window (the one that is blue and normally can be done with the enter key).
    I tried:
    keystroke (ASCII character 13)
    keystroke (ASCII character 10)
    keystroke return
    keystroke enter
    Non of them do the job.
    Any suggestions please? Thanks.

    Consider replacing ...
    keystroke (ASCII character 13)
    ... with ...
    tell document 1 to do JavaScript "document.myform.submit()"
    ... where 'myform' will have to be replaced with the forms' name.
    To obtain the forms' name ...
    01. Perform a right ('control' if single button mouse) button click on the form based web page. A contextual menu will appear.
    02. Select the 'View Source' menu item. A new 'Safari' will appear with the title beginning with 'Source of ...'.
    03. Look for a line similar to ...
    <form name="myform" action="submit-form.php">
    ... Note, the name="myform". This is the forms' name. Whatever is between the name="" is what you need to substitute 'myform' with, in 'tell document 1 to do JavaScript "document.myform.submit()"'.
    I entered ...
    tell application "Safari" to tell document 1 to do JavaScript "document.myform.submit()"
    ... in 'Script Editor', and visited 'JavaScript Form Submit example'. When the AppleScript code was executed, the web page responded accordingly.
    New test of code. With 'JavaScript Form Submit example' again displayed, the following code ...
    set tValue to "ChangeAgent"
    tell application "Safari"
    tell document 1
    do JavaScript ("myform.query.value=\"" & tValue & "\"")
    do JavaScript "document.myform.submit()"
    end tell
    end tell
    ... was entered into 'Script Editor', and executed.
    The results were as expected - the resultant web page reported ...
    Great! The Form is Submitted Successfully!
    Query:'ChangeAgent'
    Back
    ... And, the code was condensed even further ...
    set tValue to "ChangeAgent"
    tell application "Safari" to tell document 1 to do JavaScript ("myform.query.value=\"" & tValue & "\"; document.myform.submit()")
    ... producing the desired results.

  • Beats audio program not work

    hi i have a HP Pavilion dv6-6c20ed Entertainment Notebook it a very nice thing but i have a question
    the beat program dos not work i have a beats headset but if i want to trun the bass to high its not work
    can you please help me?

    Hi,
    Try using Recovery Manager to reinstall your original IDT HD Audio driver ( this will also reinstall the Beats gui ) - the procedure for using recovery manager to reinstall Software and Drivers is detailed in the relevant document on the link below.
    Recovery Manager - Windows 8.
    Recovery Manager - Windows 7
    Recovery Manager - Windows Vista
    After the reinstallation has completed, restart the notebook.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Simple program not working

    Following an example from "C: The Programming Language" (Kernighan & Ritchie), I typed this program into XCode, using the Standard Tool Project under Command Line Utility:
    #include <stdio.h>
    /* count characters in input; 1st version */
    main()
    long nc;
    nc = 0;
    while (getchar() != EOF)
    ++nc;
    printf("%ld\n", nc);
    When I clicked Build & Go, I didn't get any errors, and the program ran fine. However, no matter what my input, I don't get an output. What's the problem with this program, and/or my computer?

    musicwind95 wrote:
    If I don't get a reply within a day or two here, I'm making a new thread with this.
    Once the A-team sees you've learned the cleverly hidden secret of how to say thanks around here, a new thread is like wearing a short skirt five minutes before closing.
    That said, your question is too interesting to pass up:
    When I click Build & Go, it tells me that the line "if (c == ' ' || c == '
    ' || c = '     ')" has an invalid lvalue in assignment.
    Your followers know c='t' was just a typo, but the Lval error it produced is very instructive.
    Typos that swap '=' for '==' often cause very tenacious bugs. In many cases the operators can be swapped without making the syntax invalid or causing a runtime error. Not too long ago I found code like this in a game program that had been online for over 12 years (ok, not a game played by half of all teenagers in North America, but literally 12+ yrs just the same):
    if (c = 2)
    activate = TRUE;
    else
    continue;
    The expression (c=2) not only assigns the value 2 to c, the value of the entire expression takes the value of the Lvar, which has become 2. When evaluating a boolean expression, everything but zero is TRUE, so the else branch is never reached. Most modern compilers will warn about a simple assignment (in the absence of any boolean operators) where a boolean is expected. But some of the compilers in use 12 yrs ago weren't that helpful.
    But (c==' ' || c=='
    ' || c='     ') is much more interesting! Boolean operators take precedence over assignments, so the boolean expressions are evaluated first, as if the larger expression were this:
    ( (c == ' ' || c == '
    ' || c) = '     ')
    When the inner expression is evaluated, the result is going to be either TRUE or FALSE; i.e. non-zero or zero (almost always TRUE in this case since c has just eaten a non-zero char). So now the expression becomes:
    1 = '     ' // <-- attempting to assign a constant (actually the integer 9) to a constant
    Whether the left side would evaluate to 1 or 0 is beside the point. Only a variable may be an Lval, hence the error.
    - Ray

Maybe you are looking for