🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.programming
Article #216902

Re: problem z if przy debugowaniu w VSCode

#216902
From: Queequeg
Date: Fri, 15 May 2020 08:16
35 lines
1781 bytes
RM <robert_magdziarz@wp.pl> wrote:

> i mimo że m = 1 oraz matches2.size() == 5 to debuger wchodzi mi do 
> gałęzi else. (Zmienna m jest typu unsigned int a zmienna matches2 typu 
> smatch.)
> Jak to możliwe?

W gdb jest dobrze. Sprawdź z takim programem.

(gdb) l
1       #include <stdio.h>
2
3       int main(void)
4       {
5               int m = 1, ms = 5;
6               if (m + 1 < ms - 1)
7                       printf("tak\n");
8               else
9                       printf("nie\n");
10              return 0;
(gdb) b 5
Breakpoint 1 at 0x10414: file a.c, line 5.
(gdb) r
Starting program: /tmp/a

Breakpoint 1, main () at a.c:5
5               int m = 1, ms = 5;
(gdb) s
6               if (m + 1 < ms - 1)
(gdb) s
7                       printf("tak\n");
(gdb)

-- 
https://www.youtube.com/watch?v=9lSzL1DqQn0
Technical Details
Message-ID: <f8df7c9b-470c-432c-a64a-6da7c216ea5a@trust.no1>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.chmurka.net!.POSTED.pi.v.chmurka.net!not-for-mail
References: <r77hn3$5uj3$1@portraits.wsisiz.edu.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.chmurka.net!.POSTED.pi.v.chmurka.net!not-for-mail
From: queequeg@trust.no1 (Queequeg)
Newsgroups: pl.comp.programming
Subject: Re: problem z if przy debugowaniu w VSCode
Date: Fri, 15 May 2020 08:16:59 +0000 (UTC)
Organization: news.chmurka.net
Message-ID: <f8df7c9b-470c-432c-a64a-6da7c216ea5a@trust.no1>
References: <r77hn3$5uj3$1@portraits.wsisiz.edu.pl>
NNTP-Posting-Host: pi.v.chmurka.net
Mime-Version: 1.0
Injection-Date: Fri, 15 May 2020 08:16:59 +0000 (UTC)
Injection-Info: vps.chmurka.net; posting-account="queequeg"; posting-host="pi.v.chmurka.net:172.24.44.20"; logging-data="18792"; mail-complaints-to="abuse-news.(at).chmurka.net"
User-Agent: tin/2.4.3-20181224 ("Glen Mhor") (UNIX) (Linux/4.19.57-v7+ (armv7l))
Cancel-Lock: sha1:JRRap2loUZh9menwr50zzu/aFHo=
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit