On Sun, Jun 16, 2013 at 3:57 PM, Freewanting wrote:
> Well, my operating process is:
>
> input pyclewn in the terminal, then I use :e code.c to test:
>
> //code.c
>
> #include <stdio.h>
>
>
> int main(int argc, char *argv[])
> {
>     int n;
>     scanf("%d", &n);
>     if(n < 1)
>     {
>         printf("Invalid parameter");
>         return -1;
>     }
>
>     printf("n=%d", n);
>
>     return 0;
> }


Note that you are referencing 'n' on line 7, and 'n' is uninitialized.
You should probably replace line 6 with something like:

    int n = 0;


> then :Cfile codeapp to load it.  And :Cmapkeys to open mapping keys.
> :Cbreak 6  to set a breakpoint.
>
> I use Shift+r to run it, then Ctrl+n to line 6, but I can't input a number
> for n .


See in the gdb documentation, the 'print' command. To change 'n' to
456:

    :Cprint n = 456


> Anyhow, if continue to press Ctrl+n,  program will run to line 7 until line
> 11,
> this not what i want. So I confused.  Thanks for your advance.


-- 
Xavier

Les Chemins de Lokoti: http://lokoti.alwaysdata.net

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Pyclewn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyclewn-general

Reply via email to