User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » how do I run visual basic code Page [1]  
jlancas03
All American
9645 Posts
user info
edit post

?

someone sent me some code in an emal and told me to copy it and save as an ASCII text with the BAS extension.

I tried "Just BASIC 1.01" but it has to debug... i'm not sure if it's JustBASIC or the code.... so i'm really trying to figure out how to get Microsoft VB.


would msdn or technet include VB?

9/14/2005 5:47:59 PM

Noen
All American
31346 Posts
user info
edit post

uh, if you just want to run the code, tell the guy to send you a compiled exe.

Otherwise, if it's Visual Basic, you need MS Visual Basic.

.bas sounds like its regular ol basic though.

9/14/2005 6:13:00 PM

kiljadn
All American
44689 Posts
user info
edit post

why the fuck would he send you uncompiled code unless you were proofing it for him?

9/14/2005 6:46:13 PM

eraser
All American
6733 Posts
user info
edit post

Quote :
"someone sent me some code in an emal and told me to copy it and save as an ASCII text with the BAS extension."


haha.

This is a great way to distribute viruses. Its like a computer version of social darwinism.

"Hey, paste this code into a text editor and save it with a .VBS extention then run it."

9/14/2005 6:49:37 PM

LimpyNuts
All American
16859 Posts
user info
edit post

post the code and i'll tell you what it does and if it's not malicious i'll compile it

9/14/2005 10:28:10 PM

jlancas03
All American
9645 Posts
user info
edit post

10 CLS: DIM E(30,10),V(14)

20 FOR R=1 TO 27

30 FOR C=1 TO 4

40 READ E(R,C)

50 NEXT C,R

60 DATA 6,14.97,.366,.412

70 DATA 8,11.87,.356,.412

80 DATA 10,9.76,.313,.412

90 DATA 12,8.44,.288,.412

100 DATA 14,7.71,.269,.412

110 DATA 16,6.76,.255,.412

120 DATA 18,5.99,.245,.412

130 DATA 20,5.38,.239,.412

140 DATA 25,4.99,.230,.412

150 DATA 30,4.32,.225,.412

160 DATA 35,3.77,.221,.412

170 DATA 40,3.33,.217,.412

180 DATA 12,19.13,.380,.538

190 DATA 14,17.75,.354,.538

200 DATA 16,16.35,.334,.538

210 DATA 18,14.25,.323,.538

220 DATA 20,12.58,.316,.538

230 DATA 25,10.90,.307,.538

240 DATA 30,9.35,.301,.538

250 DATA 35,8.17,.296,.538

260 DATA 40,7.00,.290,.538

270 DATA 45,6.15,.288,.538

280 DATA 50,5.35,.285,.538

290 DATA 60,4.75,.282,.538

300 DATA 70,4.10,.281,.538

310 DATA 80,3.70,.279,.538

320 DATA 100,3.3,.277,.538

1000 INPUT"1-DUAL 2-COAL 3-SAND";Z: ON Z GOTO 1040,1040,1300

1010 V=V+1: TT=0

1020 FOR K=1 TO 30: E(K,5)=.0679*V: NEXT K: GOSUB 1120

1030 IF EB<5 THEN 1010 ELSE 1230

1040 INPUT"TOTAL DEPTH OF COAL";LC

1050 INPUT"FIRST SIEVE COAL (6-40)";S

1060 FOR R=1 TO 12

1070 IF E(R,1)=S GOTO 1090

1080 NEXT R

1090 FOR K=R TO 12

1100 INPUT"% RETAINED";E(K,6)

1110 NEXT K: IF Z=1 THEN 1300 ELSE GOSUB 1400

1115 GOTO 1010

1120 FOR K=1 TO 12: E(K,7)=LC*E(K,6)/100: NEXT K

1130 FOR K=13 TO 27: E(K,7)=LS*E(K,6)/100: NEXT K

1140 FOR K=1 TO 27: E(K,8)=E(K,5)/E(K,2): NEXT K

1150 FOR K=1 TO 27: E(K,9)=E(K,8)^E(K,3): NEXT K

1160 FOR K=1 TO 27: E(K,10)=E(K,7)*E(K,4)/(1-E(K,9)): NEXT K

1170 FOR K=1 TO 27: IF E(K,10)
1180 E(K,10)=E(K,7)

1190 NEXT K

1200 LV=0

1210 FOR K=1 TO 27: LV=LV+E(K,10): NEXT K

1220 EB=(LV/(LC+LS)*100)-100: RETURN

1230 FOR K=1 TO 27

1240 IF E(K,10)=0 GOTO 1270

1250 DF=E(K,10)-E(K,7): TT=TT+DF

1260 REM LPRINT E(K,1),E(K,7),E(K,10),DF,TT

1270 NEXT K

1280 GOSUB 1460

1290 IF EB<50 THEN 1010 ELSE 1600

1300 INPUT"TOTAL DEPTH OF SAND";LS

1310 INPUT"FIRST SIEVE SAND (12-100)";S

1320 FOR R=13 TO 27

1330 IF E(R,1)=S GOTO 1350

1340 NEXT R

1350 FOR K=R TO 27

1360 INPUT"% RETAINED";E(K,6)

1370 NEXT K

1380 GOSUB 1400

1390 GOTO 1010

1400 INPUT"HEADING";H$

1401 OPEN "O",1,"EXPDAT.TXT"

1402 PRINT#1," "H$

1410 CLS: PRINT" "H$

1412 PRINT#1," % 5C/41F 10C/50F 15C/59F 20C/68F 25C/77F 30C/86F"

1414 PRINT#1,"EXPANSION GPM/FT2 GPM/FT2 GPM/FT2 GPM/FT2 GPM/FT2 GPM/FT2"

1420 PRINT" % @ 5C/41F 10C/50F 15C/59F 20C/68F 25C/77F 30C/86F"

1430 PRINT"EXPANSION GPM/FT2 GPM/FT2 GPM/FT2 GPM/FT2 GPM/FT2 GPM/FT2"

1440 P$= " ##.# ##.# ##.# ##.# ##.# ##.# ##.#"

1450 RETURN

1460 V(1)=.6*V

1470 V(2)=.68*V

1480 V(3)=.75*V

1490 V(4)=.83*V

1500 V(5)=.91*V

1510 V(6)=V

1520 V(7)=1.09*V

1530 PRINT USING P$;EB,V(2),V(3),V(4),V(5),V(6),V(7)

1535 PRINT#1, USING P$;EB,V(2),V(3),V(4),V(5),V(6),V(7)

1540 RETURN

1600 CLOSE: INPUT ZZ: SYSTEM

9/15/2005 9:32:36 AM

scud
All American
10803 Posts
user info
edit post

http://en.wikipedia.org/wiki/BASIC_programming_language

http://www.qbasic.com/frames.shtml

9/15/2005 10:13:14 AM

MiniMe_877
All American
4414 Posts
user info
edit post

ah the memories, I started learning programming with QBasic and Commodore-64 Basic

9/15/2005 10:35:22 AM

eraser
All American
6733 Posts
user info
edit post

I learned to program on a Commodore VIC20.

I switched to QBasic when I got my first 386SX 25 (2 mb RAM). I was excited when I got QuickBASIC and could compile programs.

9/15/2005 1:32:02 PM

MiniMe_877
All American
4414 Posts
user info
edit post

I can vaguely remember using GW-Basic, what did that come with?

[Edited on September 15, 2005 at 2:16 PM. Reason : nevermind http://en.wikipedia.org/wiki/GWBASIC]

9/15/2005 2:14:22 PM

eraser
All American
6733 Posts
user info
edit post

I never did use GW-BASIC much.

That was around the time of edlin.

(edlin was SOOO GAWDAWFUL!)

There was a time when I preferred to use line numbers and might have really liked GW-BASIC but I didn't ever see it until I had been using QBasic for a while and got into it.

9/15/2005 3:34:23 PM

 Message Boards » Tech Talk » how do I run visual basic code Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.38 - our disclaimer.