CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Tue, 26 Aug 2025 00:10:24 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20080906231939
location: https://web.archive.org/web/20080906231939/https://www.daniweb.com/code/snippet136.html
server-timing: captures_list;dur=0.484686, exclusion.robots;dur=0.022442, exclusion.robots.policy;dur=0.012773, esindex;dur=0.009343, cdx.remote;dur=30.154015, LoadShardBlock;dur=345.039175, PetaboxLoader3.datanode;dur=137.288330, PetaboxLoader3.resolve;dur=60.076165
x-app-server: wwwb-app200
x-ts: 302
x-tr: 402
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
set-cookie: wb-p-SERVER=wwwb-app200; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Tue, 26 Aug 2025 00:10:25 GMT
content-type: text/html; charset=utf-8
x-archive-orig-date: Sun, 07 Sep 2008 06:19:58 GMT
x-archive-orig-server: Apache/2.2
x-archive-orig-x-powered-by: PHP/5.1.6
x-archive-orig-set-cookie: bblastvisit=1220768398; expires=Mon, 07-Sep-2009 06:19:58 GMT; path=/; domain=.daniweb.com
x-archive-orig-set-cookie: bblastactivity=0; expires=Mon, 07-Sep-2009 06:19:58 GMT; path=/; domain=.daniweb.com
x-archive-orig-cache-control: private
x-archive-orig-pragma: private
x-archive-orig-connection: close
x-archive-orig-transfer-encoding: chunked
x-archive-orig-x_commoncrawl_parsesegmentid: 4213
x-archive-orig-x_commoncrawl_originalurl: https://www.daniweb.com/code/snippet136.html
x-archive-orig-x_commoncrawl_urlfp: 1777774027879356245
x-archive-orig-x_commoncrawl_hostfp: -6905732606072050477
x-archive-orig-x_commoncrawl_signature: c8420b40eabddca75a2b50723e0dac8c
x-archive-orig-x_commoncrawl_crawlno: 1
x-archive-orig-x_commoncrawl_fetchtimestamp: 1220768379518
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Sat, 06 Sep 2008 23:19:39 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Fri, 14 Jan 2005 15:56:19 GMT", ; rel="prev memento"; datetime="Fri, 02 Nov 2007 13:30:46 GMT", ; rel="memento"; datetime="Sat, 06 Sep 2008 23:19:39 GMT", ; rel="last memento"; datetime="Sat, 06 Sep 2008 23:19:39 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 1223087483214_48-c/1223087518298_32.arc.gz
server-timing: captures_list;dur=0.591842, exclusion.robots;dur=0.037853, exclusion.robots.policy;dur=0.026403, esindex;dur=0.010828, cdx.remote;dur=5.101431, LoadShardBlock;dur=185.776854, PetaboxLoader3.datanode;dur=140.186131, PetaboxLoader3.resolve;dur=154.268429, load_resource;dur=158.155802
x-app-server: wwwb-app200
x-ts: 200
x-tr: 431
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
QBasic character counter - helped by Buff - qbasic
QBasic character counter - helped by Buff
•
•
•
•

What is DaniWeb IT Discussion Community?
You're currently browsing the Legacy and Other Languages section within the Software Development category of DaniWeb, a massive community of 402,639 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,228 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Legacy and Other Languages advertiser: Programming Forums
This is a little program in QBasic which counts the number of characters in a string. Made by Buff - two errors removed by me. Thanks Buff.
DECLARE SUB GetWords (st$, wds%) st$ = "Hello my name is John Doe" IF RIGHT$(st$, 1) <> " " THEN st$ = st$ + " " FOR k% = 1 TO LEN(st$) IF MID$(st$, k%, 1) = " " THEN words% = words% + 1 characters% = characters% + 1 NEXT PRINT "total characters="; characters% PRINT "total words="; words% xst$ = "Hello my name is John Doe" GetWords xst$, words% PRINT "words= "; words% SUB GetWords (st$, wds%) IF RIGHT$(st$, 1) <> " " THEN st$ = st$ + " " FOR k% = 1 TO LEN(st$) IF MID$(st$, k%, 1) = " " THEN words% = words% + 1 characters% = characters% + 1 NEXT 'print "total characters=";characters% 'print "total words=";words% wds% = words% END SUB
Comments (Newest First)
rhenerlau | Newbie Poster | Apr 22nd, 2005

•
•
•
•
The Len() function is all you really need
cscgal | The Queen of DaniWeb | Jan 1st, 2005

•
•
•
•
Thank you ... and thank Buff. Who is Buff

Post Comment
•
•
•
•
DaniWeb Marketplace (Sponsored Links)
Forum Highlights
- Legacy and Other Languages Forum
- Today's Posts
- Unanswered Threads
Related Features
DANIWEB FEATURE INDEX
Advertisement
Statistics