Author Topic: Better way?  (Read 4158 times)

0 Members and 1 Guest are viewing this topic.

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Better way?
« on: September 16, 2011, 08:29:01 am »
Is there are better way than doing this?
Code: [Select]
:..IF
:If D=1
:GetCalc("vS01",Y1)
:End
:If D=2
:GetCalc("vS02",Y1)
:End
:If D=3
:GetCalc("vS03",Y1)
:End
:If D=4
:GetCalc("vS04",Y1)
:End
:If D=5
:GetCalc("vS05",Y1)
:End
:If D=6
:GetCalc("vS06",Y1)
:End
:If D=7
:GetCalc("vS07",Y1)
:End
:If D=8
:GetCalc("vS08",Y1)
:End
:If D=9
:GetCalc("vS09",Y1)
:End
:If D=10
:GetCalc("vS10",Y1)
:End
:If D=11
:GetCalc("vS11",Y1)
:End
:If D=12
:GetCalc("vS12",Y1)
:End
:If D=13
:GetCalc("vS13",Y1)
:End
:If D=14
:GetCalc("vS14",Y1)
:End
:If D=15
:GetCalc("vS15",Y1)
:End
:If D=16
:GetCalc("vS16",Y1)
:End
:If D=17
:GetCalc("vS17",Y1)
:End
:If D=18
:GetCalc("vS18",Y1)
:End
:If D=19
:GetCalc("vS19",Y1)
:End
:If D=20
:GetCalc("vS20",Y1)
:End
:If D=21
:GetCalc("vS21",Y1)
:End
:If D=22
:GetCalc("vS22",Y1)
:End
:If D=23
:GetCalc("vS23",Y1)
:End
:If D=24
:GetCalc("vS24",Y1)
:End
:If D=25
:GetCalc("vS25",Y1)
:End
:If D=26
:GetCalc("vS26",Y1)
:End
:If D=27
:GetCalc("vS27",Y1)
:End
:If D=28
:GetCalc("vS28",Y1)
:End
:If D=29
:GetCalc("vS29",Y1)
:End
:If D=30
:GetCalc("vS30",Y1)
:End
:If D=31
:GetCalc("vS31",Y1)
:End
:If D=32
:GetCalc("vS32",Y1)
:End
:If D=33
:GetCalc("vS33",Y1)
:End
:If D=34
:GetCalc("vS34",Y1)
:End
:If D=35
:GetCalc("vS35",Y1)
:End
:If D=36
:GetCalc("vS36",Y1)
:End
:If D=37
:GetCalc("vS37",Y1)
:End
:If D=38
:GetCalc("vS38",Y1)
:End
:If D=39
:GetCalc("vS39",Y1)
:End
:If D=40
:GetCalc("vS40",Y1)
:End
:If D=41
:GetCalc("vS41",Y1)
:End
:If D=42
:GetCalc("vS42",Y1)
:End
:If D=43
:GetCalc("vS43",Y1)
:End
:If D=44
:GetCalc("vS44",Y1)
:End
:If D=45
:GetCalc("vS45",Y1)
:End
:If D=46
:GetCalc("vS46",Y1)
:End
:If D=47
:GetCalc("vS47",Y1)
:End
:If D=48
:GetCalc("vS48",Y1)
:End
:If D=49
:GetCalc("vS49",Y1)
:End
:If D=50
:GetCalc("vS50",Y1)
:End
Sig wipe!

Offline imo_inx

  • Manman, SaviourOfTheMultiverse!
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 473
  • Rating: +27/-8
  • imo_inx
    • View Profile
Re: Better way?
« Reply #1 on: September 16, 2011, 08:30:43 am »
Sooo... Much... Code... I think there may be a better way. Just what are you going to do with it?


Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Better way?
« Reply #2 on: September 16, 2011, 08:35:00 am »
Loading pics from appvars XP
It's just part of it, but I'm pretty sure there is a better way O.o
Sig wipe!

Offline imo_inx

  • Manman, SaviourOfTheMultiverse!
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 473
  • Rating: +27/-8
  • imo_inx
    • View Profile
Re: Better way?
« Reply #3 on: September 16, 2011, 08:40:42 am »
I know that I set all the keys to one variable with GetKey. Is there a way with GetCalc?


Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Better way?
« Reply #4 on: September 16, 2011, 08:44:44 am »
I don't know. Otherwise, I wouldn't post this question. XP
The program is supposed to load picture based on the value of D.
since the "appvS#" are strings I don't know what to do with it XP
Sig wipe!

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Better way?
« Reply #5 on: September 16, 2011, 10:12:16 am »
If you're not compiling your program as an application, try this:

Code: [Select]
:"vS00"→Str0
:D^10*256+(D/10)+ᴇ3030→{Str0+2}ʳ
:GetCalc(Str0,Y₁)


If you are compiling your program as an application, try this:

Code: [Select]
:"vS00"→Str0
:Copy(Str0,ᴇ984D,5)
:D^10*256+(D/10)+ᴇ3030→{ᴇ984D+2}ʳ
:GetCalc(ᴇ984D,Y₁)

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Better way?
« Reply #6 on: September 16, 2011, 11:15:36 am »
what is the square thingy?
Sig wipe!

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Better way?
« Reply #7 on: September 16, 2011, 11:35:38 am »
What are you referring to? I didn't use any square-like symbols in my code. Perhaps your computer is rendering a character wrong? This is what the code should look like:

Spoiler For Code:


Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Better way?
« Reply #8 on: September 16, 2011, 11:37:20 am »
oh it was a E symbol. XP
Ok. thnx XD
EDIT: So that code load the appv depends on D, right?
Yay then I can save like >3500 bytes out of my program XD
EDIT2: It actually worked  :D
+1 for you, runer  ;D
« Last Edit: September 16, 2011, 12:05:33 pm by yeongJIN_COOL »
Sig wipe!